Skip to content

Commit

Permalink
target netstandard2.0 only
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar Yakimush authored and Ihar Yakimush committed Aug 3, 2018
1 parent 326a859 commit 67d05ce
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Buffering" Version="0.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Community.AspNetCore.ExceptionHandling.Integration.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
public class ValuesController : ControllerBase
{
// GET api/values
[HttpGet]
Expand Down
4 changes: 2 additions & 2 deletions Community.AspNetCore.ExceptionHandling.Integration/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddMvcCore().AddJsonFormatters();

services.AddExceptionHandlingPolicies(options =>
{
Expand Down Expand Up @@ -55,7 +55,7 @@ public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
//app.UseResponseBuffering();
app.UseDeveloperExceptionPage().UseExceptionHandlingPolicies();
app.UseExceptionHandlingPolicies();
app.UseMvc();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Extension methods to configure exception handler which write MVC action result to responce body. Userfull for writing objects</Description>
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
Expand All @@ -19,10 +19,11 @@
<ApplicationIcon />
<OutputType>Library</OutputType>
<StartupObject />
<PackageReleaseNotes>netstandard2.0 support added</PackageReleaseNotes>
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
<PackageTags>aspnetcore exception handling policy json response</PackageTags>
<AssemblyVersion>2.0.2.0</AssemblyVersion>
<Version>2.0.2</Version>
<AssemblyVersion>2.0.3.0</AssemblyVersion>
<Version>2.0.3</Version>
<Company />
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
<FileVersion>2.0.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Middleware to configure exception handling policies. Configure chain of handlers per exception type. OOTB handlers: log, retry, set responce headers and body</Description>
<PackageProjectUrl>https://github.com/IharYakimush/asp-net-core-exception-handling</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/IharYakimush/asp-net-core-exception-handling/blob/develop/LICENSE</PackageLicenseUrl>
<Copyright>IharYakimush</Copyright>
<PackageTags>aspnetcore exception handling policy</PackageTags>
<AssemblyVersion>2.0.2.0</AssemblyVersion>
<AssemblyVersion>2.0.3.0</AssemblyVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<FileVersion>2.0.2.0</FileVersion>
<FileVersion>2.0.3.0</FileVersion>
<Company />
<Authors>IharYakimush</Authors>
<Version>2.0.2</Version>
<Version>2.0.3</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\sgn.snk</AssemblyOriginatorKeyFile>
<ApplicationIcon />
<OutputType>Library</OutputType>
<StartupObject />
<PackageReleaseNotes>WithBody method changed to use Stream instead of StreamWriter to unify behaviour in case of buffered and chunked responses</PackageReleaseNotes>
<PackageReleaseNotes>target netstandard2.0 only</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Sample of transitions:
![alt text](/Transitions.png)

### Nuget
| Package | Target | Comments |
| Package | Comments |
| ---------| ------------- | ------------- |
| Community.AspNetCore.ExceptionHandling | netstandard2.0 netcoreapp2.1 | Main functionality |
| Community.AspNetCore.ExceptionHandling.Mvc | netstandard2.0 netcoreapp2.1 | Alllow to use MVC IActionResult (including ObjectResult) in 'Response' handler |
| 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 |
| Community.AspNetCore.ExceptionHandling | Main functionality |
| Community.AspNetCore.ExceptionHandling.Mvc | Allow to use MVC IActionResult (including ObjectResult) in 'Response' handler |
| 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 comments on commit 67d05ce

Please sign in to comment.