Skip to content

Commit 67d05ce

Browse files
Ihar YakimushIhar Yakimush
authored andcommitted
target netstandard2.0 only
1 parent 326a859 commit 67d05ce

File tree

7 files changed

+23
-18
lines changed

7 files changed

+23
-18
lines changed

Community.AspNetCore.ExceptionHandling.Integration/Community.AspNetCore.ExceptionHandling.Integration.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<Folder Include="wwwroot\" />
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.2" />
1312
<PackageReference Include="Microsoft.AspNetCore.Buffering" Version="0.2.2" />
13+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
14+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.1" />
15+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" Version="2.1.1" />
1416
</ItemGroup>
1517

1618
<ItemGroup>

Community.AspNetCore.ExceptionHandling.Integration/Controllers/ValuesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Community.AspNetCore.ExceptionHandling.Integration.Controllers
77
{
88
[Route("api/[controller]")]
9-
public class ValuesController : Controller
9+
public class ValuesController : ControllerBase
1010
{
1111
// GET api/values
1212
[HttpGet]

Community.AspNetCore.ExceptionHandling.Integration/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public Startup(IConfiguration configuration)
2121
// This method gets called by the runtime. Use this method to add services to the container.
2222
public void ConfigureServices(IServiceCollection services)
2323
{
24-
services.AddMvc();
24+
services.AddMvcCore().AddJsonFormatters();
2525

2626
services.AddExceptionHandlingPolicies(options =>
2727
{
@@ -55,7 +55,7 @@ public void ConfigureServices(IServiceCollection services)
5555
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
5656
{
5757
//app.UseResponseBuffering();
58-
app.UseDeveloperExceptionPage().UseExceptionHandlingPolicies();
58+
app.UseExceptionHandlingPolicies();
5959
app.UseMvc();
6060
}
6161
}

Community.AspNetCore.ExceptionHandling.Mvc/Community.AspNetCore.ExceptionHandling.Mvc.csproj

Lines changed: 3 additions & 2 deletions
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;netcoreapp2.1</TargetFrameworks>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<Description>Extension methods to configure exception handler which write MVC action result to responce body. Userfull for writing objects</Description>
66
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
77
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
@@ -19,10 +19,11 @@
1919
<ApplicationIcon />
2020
<OutputType>Library</OutputType>
2121
<StartupObject />
22-
<PackageReleaseNotes>netstandard2.0 support added</PackageReleaseNotes>
22+
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26+
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.2" />
2627
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
2728
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.1" />
2829
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.1.1" />

Community.AspNetCore.ExceptionHandling.NewtonsoftJson/Community.AspNetCore.ExceptionHandling.NewtonsoftJson.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
99
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
1010
<PackageTags>aspnetcore exception handling policy json response</PackageTags>
11-
<AssemblyVersion>2.0.2.0</AssemblyVersion>
12-
<Version>2.0.2</Version>
11+
<AssemblyVersion>2.0.3.0</AssemblyVersion>
12+
<Version>2.0.3</Version>
1313
<Company />
1414
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1515
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
16+
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
17+
<FileVersion>2.0.3.0</FileVersion>
1618
</PropertyGroup>
1719

1820
<ItemGroup>

Community.AspNetCore.ExceptionHandling/Community.AspNetCore.ExceptionHandling.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<Description>Middleware to configure exception handling policies. Configure chain of handlers per exception type. OOTB handlers: log, retry, set responce headers and body</Description>
66
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
77
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
88
<Copyright>IharYakimush</Copyright>
99
<PackageTags>aspnetcore exception handling policy</PackageTags>
10-
<AssemblyVersion>2.0.2.0</AssemblyVersion>
10+
<AssemblyVersion>2.0.3.0</AssemblyVersion>
1111
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1212
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
13-
<FileVersion>2.0.2.0</FileVersion>
13+
<FileVersion>2.0.3.0</FileVersion>
1414
<Company />
1515
<Authors>IharYakimush</Authors>
16-
<Version>2.0.2</Version>
16+
<Version>2.0.3</Version>
1717
<SignAssembly>true</SignAssembly>
1818
<AssemblyOriginatorKeyFile>..\sgn.snk</AssemblyOriginatorKeyFile>
1919
<ApplicationIcon />
2020
<OutputType>Library</OutputType>
2121
<StartupObject />
22-
<PackageReleaseNotes>WithBody method changed to use Stream instead of StreamWriter to unify behaviour in case of buffered and chunked responses</PackageReleaseNotes>
22+
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
2323
</PropertyGroup>
2424

2525
<PropertyGroup Condition="'$(Configuration)'=='Debug'">

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Sample of transitions:
6262
![alt text](/Transitions.png)
6363

6464
### Nuget
65-
| Package | Target | Comments |
65+
| Package | Comments |
6666
| ---------| ------------- | ------------- |
67-
| Community.AspNetCore.ExceptionHandling | netstandard2.0 netcoreapp2.1 | Main functionality |
68-
| Community.AspNetCore.ExceptionHandling.Mvc | netstandard2.0 netcoreapp2.1 | Alllow to use MVC IActionResult (including ObjectResult) in 'Response' handler |
69-
| Community.AspNetCore.ExceptionHandling.NewtonsoftJson | netstandard2.0 | Allow to set Json serialized object as a response body in 'Response' handler. Use it only if 'Community.AspNetCore.ExceptionHandling.Mvc' usage not possible |
67+
| Community.AspNetCore.ExceptionHandling | Main functionality |
68+
| Community.AspNetCore.ExceptionHandling.Mvc | Allow to use MVC IActionResult (including ObjectResult) in 'Response' handler |
69+
| Community.AspNetCore.ExceptionHandling.NewtonsoftJson | Allow to set Json serialized object as a response body in 'Response' handler. Use it only if 'Community.AspNetCore.ExceptionHandling.Mvc' usage not possible |

0 commit comments

Comments
 (0)