Skip to content

Commit 9e0f99e

Browse files
authored
Drop .NET 6 runtime support (compiling still works for libraries) (#575)
1 parent ace976e commit 9e0f99e

File tree

12 files changed

+17
-30
lines changed

12 files changed

+17
-30
lines changed

samples/Modules/ModulesLibrary/ModulesLibrary.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;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

src/Microsoft.AspNetCore.SystemWebAdapters.CoreServices/Microsoft.AspNetCore.SystemWebAdapters.CoreServices.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
44
<IsPackable>true</IsPackable>
55
<EnablePackageValidation>true</EnablePackageValidation>
66
<RootNamespace>Microsoft.AspNetCore.SystemWebAdapters</RootNamespace>
@@ -17,11 +17,6 @@
1717
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1818
</ItemGroup>
1919

20-
<!-- Provided in box for .NET 8+ -->
21-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
22-
<PackageReference Include="Microsoft.Bcl.TimeProvider" />
23-
</ItemGroup>
24-
2520
<ItemGroup>
2621
<Using Include="Microsoft.AspNetCore.Http.HttpContext" Alias="HttpContextCore" />
2722
<Using Include="Microsoft.AspNetCore.Http.HttpResponse" Alias="HttpResponseCore" />
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute
2+
T:System.Runtime.CompilerServices.NullableAttribute
3+
T:System.Runtime.CompilerServices.NullableContextAttribute

src/Microsoft.AspNetCore.SystemWebAdapters/IHtmlString.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
// This is available in-box in .NET Framework and .NET 8+. We type forward to that when possible, otherwise, provide an implementation here for compat purposes.
5-
#if NETSTANDARD || NET6_0
5+
#if NETSTANDARD
66

77
namespace System.Web;
88

src/Microsoft.AspNetCore.SystemWebAdapters/Microsoft.AspNetCore.SystemWebAdapters.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net8.0;netstandard2.0;net45;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0;netstandard2.0;net45;net472</TargetFrameworks>
55
<IsPackable>true</IsPackable>
66

77
<!-- This will validate that the package will unify correctly with System.Web.dll -->
@@ -35,17 +35,6 @@
3535
<PackageReference Include="System.Security.Principal.Windows" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
39-
40-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
41-
42-
<PackageReference Include="System.Runtime.Caching" />
43-
44-
<Using Include="Microsoft.AspNetCore.Http.HttpContext" Alias="HttpContextCore" />
45-
<Using Include="Microsoft.AspNetCore.Http.HttpResponse" Alias="HttpResponseCore" />
46-
<Using Include="Microsoft.AspNetCore.Http.HttpRequest" Alias="HttpRequestCore" />
47-
</ItemGroup>
48-
4938
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
5039
<FrameworkReference Include="Microsoft.AspNetCore.App" />
5140

@@ -78,6 +67,6 @@
7867
<None Include="Build\*" Pack="true" PackagePath="Build\" />
7968
</ItemGroup>
8069

81-
<Import Condition=" '$(TargetFramework)' == 'net6.0' " Project="Generated/GenerateApis.targets" />
70+
<Import Condition=" '$(TargetFramework)' == 'net8.0' " Project="Generated/GenerateApis.targets" />
8271

8372
</Project>

test/Microsoft.AspNetCore.SystemWebAdapters.Apis.Tests/Microsoft.AspNetCore.SystemWebAdapters.Apis.Tests.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>net6.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

test/Microsoft.AspNetCore.SystemWebAdapters.Apis.Tests/VerifyTypeForwards.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ public void VerifyPublicTypesAreForwardedToSystemWeb()
2929

3030
var systemWeb = frameworkContext.LoadFromAssemblyName("System.Web");
3131

32-
var exportedTypes = typeof(HttpContextBase).Assembly
33-
.GetExportedTypes()
32+
var adapterTypes = typeof(HttpContextBase).Assembly.GetExportedTypes()
33+
.Concat(typeof(HttpContextBase).Assembly.GetForwardedTypes());
34+
var exportedTypes = adapterTypes
3435
.Select(t => t.FullName!)
3536
.Where(t => systemWeb.GetType(t) is not null)
3637
.ToHashSet();

test/Microsoft.AspNetCore.SystemWebAdapters.CoreServices.Tests/Microsoft.AspNetCore.SystemWebAdapters.CoreServices.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Include="Autofac.Extras.Moq" />

test/Microsoft.AspNetCore.SystemWebAdapters.Tests/Microsoft.AspNetCore.SystemWebAdapters.Tests.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>net6.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

test/Samples.MVCApp.Tests/Samples.MVCApp.Tests.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-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

0 commit comments

Comments
 (0)