diff --git a/src/ExpressionDebugger.Console/ExpressionDebugger.Console.csproj b/src/ExpressionDebugger.Console/ExpressionDebugger.Console.csproj
index e7fd22a3..b78b4910 100644
--- a/src/ExpressionDebugger.Console/ExpressionDebugger.Console.csproj
+++ b/src/ExpressionDebugger.Console/ExpressionDebugger.Console.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net6.0;net7.0
true
diff --git a/src/ExpressionDebugger.Tests/ExpressionDebugger.Tests.csproj b/src/ExpressionDebugger.Tests/ExpressionDebugger.Tests.csproj
index 657fc325..5140c085 100644
--- a/src/ExpressionDebugger.Tests/ExpressionDebugger.Tests.csproj
+++ b/src/ExpressionDebugger.Tests/ExpressionDebugger.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net7.0
false
diff --git a/src/ExpressionDebugger/ExpressionDebugger.csproj b/src/ExpressionDebugger/ExpressionDebugger.csproj
index df9357e4..6b9241c3 100644
--- a/src/ExpressionDebugger/ExpressionDebugger.csproj
+++ b/src/ExpressionDebugger/ExpressionDebugger.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net7.0
True
Chaowlert Chaisrichalermpol
Step into debugging from linq expressions
diff --git a/src/ExpressionTranslator/ExpressionTranslator.csproj b/src/ExpressionTranslator/ExpressionTranslator.csproj
index 44eb22ac..70f574b7 100644
--- a/src/ExpressionTranslator/ExpressionTranslator.csproj
+++ b/src/ExpressionTranslator/ExpressionTranslator.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net7.0
True
Chaowlert Chaisrichalermpol
Translate from linq expressions to C# code
diff --git a/src/Mapster.Async.Tests/Mapster.Async.Tests.csproj b/src/Mapster.Async.Tests/Mapster.Async.Tests.csproj
index a73717fc..fea91e85 100644
--- a/src/Mapster.Async.Tests/Mapster.Async.Tests.csproj
+++ b/src/Mapster.Async.Tests/Mapster.Async.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
diff --git a/src/Mapster.Async/Mapster.Async.csproj b/src/Mapster.Async/Mapster.Async.csproj
index e3615037..5bfc252d 100644
--- a/src/Mapster.Async/Mapster.Async.csproj
+++ b/src/Mapster.Async/Mapster.Async.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
Async supports for Mapster
true
Mapster;Async
diff --git a/src/Mapster.Core/Mapster.Core.csproj b/src/Mapster.Core/Mapster.Core.csproj
index 702e8d02..736edb34 100644
--- a/src/Mapster.Core/Mapster.Core.csproj
+++ b/src/Mapster.Core/Mapster.Core.csproj
@@ -1,7 +1,7 @@
Lightweight library for Mapster and Mapster CodeGen
- net6.0
+ net7.0;net6.0
Mapster.Core
mapster
1.2.1-pre02
diff --git a/src/Mapster.DependencyInjection.Tests/Mapster.DependencyInjection.Tests.csproj b/src/Mapster.DependencyInjection.Tests/Mapster.DependencyInjection.Tests.csproj
index 5c136560..e0b62dae 100644
--- a/src/Mapster.DependencyInjection.Tests/Mapster.DependencyInjection.Tests.csproj
+++ b/src/Mapster.DependencyInjection.Tests/Mapster.DependencyInjection.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
diff --git a/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj b/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj
index 8a4a1d3b..5b614ceb 100644
--- a/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj
+++ b/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
Dependency Injection supports for Mapster
true
Mapster;DependencyInjection
diff --git a/src/Mapster.EF6/Mapster.EF6.csproj b/src/Mapster.EF6/Mapster.EF6.csproj
index b8c57b12..ff64a239 100644
--- a/src/Mapster.EF6/Mapster.EF6.csproj
+++ b/src/Mapster.EF6/Mapster.EF6.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
EF6 plugin for Mapster
true
Mapster;EF6
diff --git a/src/Mapster.EFCore.Tests/Mapster.EFCore.Tests.csproj b/src/Mapster.EFCore.Tests/Mapster.EFCore.Tests.csproj
index 411eaa44..ca407d5b 100644
--- a/src/Mapster.EFCore.Tests/Mapster.EFCore.Tests.csproj
+++ b/src/Mapster.EFCore.Tests/Mapster.EFCore.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
diff --git a/src/Mapster.EFCore/Mapster.EFCore.csproj b/src/Mapster.EFCore/Mapster.EFCore.csproj
index 77d618cd..120f7b3c 100644
--- a/src/Mapster.EFCore/Mapster.EFCore.csproj
+++ b/src/Mapster.EFCore/Mapster.EFCore.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
EFCore plugin for Mapster
true
Mapster;EFCore
diff --git a/src/Mapster.Immutable.Tests/Mapster.Immutable.Tests.csproj b/src/Mapster.Immutable.Tests/Mapster.Immutable.Tests.csproj
index ffe876ac..4b52ed69 100644
--- a/src/Mapster.Immutable.Tests/Mapster.Immutable.Tests.csproj
+++ b/src/Mapster.Immutable.Tests/Mapster.Immutable.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
diff --git a/src/Mapster.Immutable/Mapster.Immutable.csproj b/src/Mapster.Immutable/Mapster.Immutable.csproj
index a89af4d9..7a273b42 100644
--- a/src/Mapster.Immutable/Mapster.Immutable.csproj
+++ b/src/Mapster.Immutable/Mapster.Immutable.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
Immutable collection supports for Mapster
true
Mapster;Immutable
diff --git a/src/Mapster.JsonNet.Tests/Mapster.JsonNet.Tests.csproj b/src/Mapster.JsonNet.Tests/Mapster.JsonNet.Tests.csproj
index 9411f47b..b7173dfe 100644
--- a/src/Mapster.JsonNet.Tests/Mapster.JsonNet.Tests.csproj
+++ b/src/Mapster.JsonNet.Tests/Mapster.JsonNet.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
diff --git a/src/Mapster.JsonNet/Mapster.JsonNet.csproj b/src/Mapster.JsonNet/Mapster.JsonNet.csproj
index 49266168..69387e62 100644
--- a/src/Mapster.JsonNet/Mapster.JsonNet.csproj
+++ b/src/Mapster.JsonNet/Mapster.JsonNet.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
Json.net conversion supports for Mapster
true
Mapster;Json.net
diff --git a/src/Mapster.SourceGenerator/Mapster.SourceGenerator.csproj b/src/Mapster.SourceGenerator/Mapster.SourceGenerator.csproj
index 883eb758..f436bada 100644
--- a/src/Mapster.SourceGenerator/Mapster.SourceGenerator.csproj
+++ b/src/Mapster.SourceGenerator/Mapster.SourceGenerator.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
Source generator to generate mapping using Mapster
source-generator;mapster
true
diff --git a/src/Mapster.Tests/Mapster.Tests.csproj b/src/Mapster.Tests/Mapster.Tests.csproj
index 63eb3b6e..bc5331c3 100644
--- a/src/Mapster.Tests/Mapster.Tests.csproj
+++ b/src/Mapster.Tests/Mapster.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
false
Mapster.Tests
Mapster.Tests.snk
diff --git a/src/Mapster.Tool/Mapster.Tool.csproj b/src/Mapster.Tool/Mapster.Tool.csproj
index 8e4c1b2f..f62994ab 100644
--- a/src/Mapster.Tool/Mapster.Tool.csproj
+++ b/src/Mapster.Tool/Mapster.Tool.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net7.0;net6.0
true
true
dotnet-mapster
diff --git a/src/Mapster/Mapster.csproj b/src/Mapster/Mapster.csproj
index d7588978..267d910e 100644
--- a/src/Mapster/Mapster.csproj
+++ b/src/Mapster/Mapster.csproj
@@ -4,7 +4,7 @@
A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster.
Copyright (c) 2016 Chaowlert Chaisrichalermpol, Eric Swann
chaowlert;eric_swann
- net6.0
+ net7.0;net6.0
Mapster
A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster.
Mapster
diff --git a/src/Sample.AspNetCore/Sample.AspNetCore.csproj b/src/Sample.AspNetCore/Sample.AspNetCore.csproj
index 9866b4a4..c5761156 100644
--- a/src/Sample.AspNetCore/Sample.AspNetCore.csproj
+++ b/src/Sample.AspNetCore/Sample.AspNetCore.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
diff --git a/src/Sample.AspNetCore/Startup.cs b/src/Sample.AspNetCore/Startup.cs
index 8b1ee9b8..f5cdc6a1 100644
--- a/src/Sample.AspNetCore/Startup.cs
+++ b/src/Sample.AspNetCore/Startup.cs
@@ -1,6 +1,8 @@
using System.Linq.Expressions;
using ExpressionDebugger;
+#if NET6_0
using Hellang.Middleware.ProblemDetails;
+#endif
using Mapster;
using Sample.AspNetCore.Controllers;
using Sample.AspNetCore.Models;
@@ -69,7 +71,9 @@ private static TypeAdapterConfig GetConfiguredMappingConfig()
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
+ #if NET6_0
app.UseProblemDetails();
+ #endif
app.UseRouting();
app.UseAuthorization();
app.UseMvc();
diff --git a/src/Sample.CodeGen/Sample.CodeGen.csproj b/src/Sample.CodeGen/Sample.CodeGen.csproj
index 03a79b04..27485d31 100644
--- a/src/Sample.CodeGen/Sample.CodeGen.csproj
+++ b/src/Sample.CodeGen/Sample.CodeGen.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
enable
diff --git a/src/Sample.CodeGen/Startup.cs b/src/Sample.CodeGen/Startup.cs
index 8b0cad18..5b16a61c 100644
--- a/src/Sample.CodeGen/Startup.cs
+++ b/src/Sample.CodeGen/Startup.cs
@@ -1,4 +1,6 @@
+#if NET6_0
using Hellang.Middleware.ProblemDetails;
+#endif
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.OData;
@@ -27,6 +29,7 @@ public void ConfigureServices(IServiceCollection services)
.AddNewtonsoftJson();
services.AddDbContext(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
+
services.AddProblemDetails();
services.Scan(selector => selector.FromCallingAssembly()
.AddClasses().AsMatchingInterface().WithSingletonLifetime());
@@ -35,7 +38,9 @@ public void ConfigureServices(IServiceCollection services)
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
+ #if NET6_0
app.UseProblemDetails();
+ #endif
app.UseRouting();
app.UseAuthorization();
app.UseMvc();
diff --git a/src/TemplateTest/TemplateTest.csproj b/src/TemplateTest/TemplateTest.csproj
index 34af174b..2f6524f3 100644
--- a/src/TemplateTest/TemplateTest.csproj
+++ b/src/TemplateTest/TemplateTest.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0;net6.0
enable
false