Skip to content

Commit 37bd539

Browse files
committed
Drop .NET 6 runtime support (compiling still works for libraries)
1 parent 1a68951 commit 37bd539

File tree

12 files changed

+18
-28
lines changed

12 files changed

+18
-28
lines changed

samples/Modules/ModulesLibrary/ModulesLibrary.csproj

+1-1
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

+1-6
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" />
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

+1-1
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

+2-13
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

+1-1
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

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public void VerifyPublicTypesAreForwardedToSystemWeb()
3535
.Where(t => systemWeb.GetType(t) is not null)
3636
.ToHashSet();
3737

38+
// .NET 8+ this is only a typeforward, but we need it here so it shows up on the list of types
39+
// since it's technically not "exported" from the assembly
40+
exportedTypes.Add(typeof(IHtmlString).FullName!);
41+
3842
WriteExpectedFile(exportedTypes);
3943

4044
var forwardedTypes = frameworkContext.LoadFromAssemblyName("Microsoft.AspNetCore.SystemWebAdapters")

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

+1-1
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

+1-1
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

+1-1
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

test/Samples.RemoteAuth.Forms.Tests/Samples.RemoteAuth.Forms.Tests.csproj

+1-1
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

update_apis.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ param($config = "release")
44

55
$project = "src\Microsoft.AspNetCore.SystemWebAdapters\Microsoft.AspNetCore.SystemWebAdapters.csproj"
66

7-
dotnet build --no-incremental $project -c $config -f net6.0 /p:GenerateStandard=true
8-
dotnet build --no-incremental $project -c $config -f net6.0 /p:GenerateTypeForwards=true
7+
dotnet build --no-incremental $project -c $config -f net8.0 /p:GenerateStandard=true
8+
dotnet build --no-incremental $project -c $config -f net8.0 /p:GenerateTypeForwards=true
99

1010
# Script will have an error if there are git changes
1111
if(git status --porcelain){

0 commit comments

Comments
 (0)