Skip to content

Commit

Permalink
Changing supported ASP.NET Core versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tpeczek committed Nov 17, 2020
1 parent b8d08b6 commit bd13203
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.11.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lib.AspNetCore.ServerSentEvents\Lib.AspNetCore.ServerSentEvents.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="log.txt" />
Expand Down
2 changes: 1 addition & 1 deletion DocFx.AspNetCore.ServerSentEvents/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"dest": "api",
"properties": {
"TargetFramework": "netcoreapp3.0"
"TargetFramework": "net5.0"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Authors>Tomasz Pęczek</Authors>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net461</TargetFrameworks>
<AssemblyTitle>Lib.AspNetCore.ServerSentEvents</AssemblyTitle>
<AssemblyName>Lib.AspNetCore.ServerSentEvents</AssemblyName>
<PackageId>Lib.AspNetCore.ServerSentEvents</PackageId>
Expand All @@ -22,15 +22,15 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
<ItemGroup Condition="('$(TargetFramework)' == 'netcoreapp2.1') Or ('$(TargetFramework)' == 'net461')">
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.AspNetCore.Authorization.Policy" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[2.1.0,3.0.0)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<ItemGroup Condition="('$(TargetFramework)' != 'netcoreapp2.1') And ('$(TargetFramework)' != 'net461')">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETCOREAPP3_0
#if !NETCOREAPP2_1 && !NET461
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private async Task ForbidAsync(HttpContext context)

private void DisableResponseBuffering(HttpContext context)
{
#if NETCOREAPP3_0
#if !NETCOREAPP2_1 && !NET461
IHttpResponseBodyFeature responseBodyFeature = context.Features.Get<IHttpResponseBodyFeature>();
if (responseBodyFeature != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net461</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Moq" Version="4.15.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<ItemGroup Condition="('$(TargetFramework)' == 'netcoreapp2.1') Or ('$(TargetFramework)' == 'net461')">
<PackageReference Include="Microsoft.AspNetCore.Http" Version="[2.1.0,3.0.0)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="[2.1.0,3.0.0)" />
</ItemGroup>
<ItemGroup Condition="('$(TargetFramework)' != 'netcoreapp2.1') And ('$(TargetFramework)' != 'net461')">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit bd13203

Please sign in to comment.