Skip to content

Commit 24c3b5e

Browse files
authored
Merge pull request #4 from ForEvolve/v2.0
v2.0
2 parents 780e757 + 3040d0f commit 24c3b5e

File tree

18 files changed

+37
-33
lines changed

18 files changed

+37
-33
lines changed

.github/workflows/master.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ on:
1111
branches:
1212
- master
1313

14+
workflow_dispatch:
15+
1416
env:
15-
# DOTNET_2_VERSION: 2.1.808
16-
# DOTNET_3_VERSION: 3.1.302
17-
# DOTNET_5_VERSION: 5.0.100
1817
BUILD_CONFIGURATION: Release
1918
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2019

@@ -24,8 +23,7 @@ jobs:
2423
strategy:
2524
fail-fast: false
2625
matrix:
27-
# dotnet: ['2.1.x', '3.1.x', '5.0.x']
28-
dotnet: ['5.0.x']
26+
dotnet: ['6.0.x']
2927

3028
steps:
3129
- uses: actions/checkout@v1
@@ -40,15 +38,14 @@ jobs:
4038

4139
- name: Unit Test
4240
if: github.event_name == 'impossible'
43-
run: dotnet test --configuration ${{ env.BUILD_CONFIGURATION }}<
41+
run: dotnet test --configuration ${{ env.BUILD_CONFIGURATION }}
4442

4543
deploy:
4644
runs-on: ubuntu-latest
4745
needs: build-and-test
4846
strategy:
4947
matrix:
50-
# dotnet: ['2.1.x', '3.1.x', '5.0.x']
51-
dotnet: ['5.0.x']
48+
dotnet: ['6.0.x']
5249
steps:
5350
- uses: actions/checkout@v1
5451

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,17 @@ public void ConfigureServices(IServiceCollection services)
301301

302302
# Release notes
303303

304-
## 1.1.0
304+
## 2.0
305+
306+
- Drop .NET Core 3.1 support
307+
- Add support for .NET 6.0
308+
309+
## 1.1
305310

306311
- Add a handler that serializes exceptions to `ProblemDetails` (JSON)
307312
- Add the `ForEvolve.ExceptionMapper.Serialization.Json` project
308313

309-
## 1.0.0
314+
## 1.0
310315

311316
- Initial release (no yet released)
312317

samples/WebApi.HttpMiddleware/WebApi.HttpMiddleware.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

samples/WebApi.Mvc/WebApi.Mvc.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

samples/WebApi.Shared/WebApi.Shared.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
55
<IsPackable>False</IsPackable>
66
</PropertyGroup>
77

8-
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
10-
</ItemGroup>
11-
128
<ItemGroup>
139
<ProjectReference Include="..\..\src\ForEvolve.ExceptionMapper.CommonExceptions\ForEvolve.ExceptionMapper.CommonExceptions.csproj" />
1410
</ItemGroup>

src/ForEvolve.ExceptionMapper.Serialization.Json/ForEvolve.ExceptionMapper.Serialization.Json.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
6-
6+
77
<ItemGroup>
88
<FrameworkReference Include="Microsoft.AspNetCore.App" />
99
</ItemGroup>

src/ForEvolve.ExceptionMapper.Serialization.Json/SerializationJsonExtensions.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static IExceptionMappingBuilder SerializeAsProblemDetails(this IException
1212
public static IExceptionMappingBuilder SerializeAsProblemDetails(this IExceptionMappingBuilder builder, ProblemDetailsSerializationOptions options)
1313
{
1414
builder.Services.AddSingleton(options);
15-
return builder.AddExceptionHandler<ProblemDetailsSerializationHandler>();
15+
return builder.SerializeAsProblemDetailsCore();
1616
}
1717

1818
public static IExceptionMappingBuilder SerializeAsProblemDetails(this IExceptionMappingBuilder builder, IConfiguration configuration)
@@ -21,7 +21,14 @@ public static IExceptionMappingBuilder SerializeAsProblemDetails(this IException
2121
.Configure<ProblemDetailsSerializationOptions>(configuration)
2222
.AddSingleton(ctx => ctx.GetService<IOptionsMonitor<ProblemDetailsSerializationOptions>>().CurrentValue)
2323
;
24+
return builder.SerializeAsProblemDetailsCore();
25+
}
26+
27+
private static IExceptionMappingBuilder SerializeAsProblemDetailsCore(this IExceptionMappingBuilder builder)
28+
{
29+
builder.Services.AddMvcCore(); // Workaround
2430
return builder.AddExceptionHandler<ProblemDetailsSerializationHandler>();
2531
}
32+
2633
}
2734
}

src/ForEvolve.ExceptionMapper/ForEvolve.ExceptionMapper.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

test/ForEvolve.ExceptionMapper.CommonExceptions.Tests/ForEvolve.ExceptionMapper.CommonExceptions.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<PropertyGroup>
10-
<TargetFramework>netcoreapp3.1</TargetFramework>
10+
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
1111
<IsPackable>false</IsPackable>
1212
</PropertyGroup>
1313

test/ForEvolve.ExceptionMapper.CommonHttpExceptionHandlers.Tests/ForEvolve.ExceptionMapper.CommonHttpExceptionHandlers.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<PropertyGroup>
7-
<TargetFramework>netcoreapp3.1</TargetFramework>
7+
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
88
<IsPackable>false</IsPackable>
99
</PropertyGroup>
1010

0 commit comments

Comments
 (0)