Skip to content

Commit b30d42e

Browse files
Update to target .NET 8 (#159)
- Update to the .NET 8 SDK and target `net8.0`. - Add a README file to the NuGet packages as recommended by the .NET 8 SDK. - Remove now-obsolete use of `ISystemClock`. - Fix code analysis warning by using `TryGetValue()`. - Use static `ArgumentException` methods. - Use `AuthenticationFailureException` where relevant. - Use primary constructors in a few places where relevant. - Apply some IDE suggestions to use newer C# syntax. - Fix typo. - Update to the latest release of arcade for .NET 8. - Update NuGet packages to their latest versions. - Remove System.Text.Json as an explicit package reference. - Bump Microsoft.IdentityModel.Protocols to 7.0.3 as there's been some bugs in v7 that .NET 8 is picking up e.g. dotnet/aspnetcore#51430. - Fix AoT warning. - Simplify member name. - Add support for native AoT for the libraries.
1 parent ece2c73 commit b30d42e

File tree

62 files changed

+1393
-1365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1393
-1365
lines changed

Directory.Build.props

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
44

55
<PropertyGroup>
6-
<DefaultNetCoreTargetFramework>net7.0</DefaultNetCoreTargetFramework>
6+
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework>
77
<LangVersion>latest</LangVersion>
88
<NoWarn>$(NoWarn);CS1591</NoWarn>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -43,6 +43,7 @@
4343
<PackageIconFullPath>$(MSBuildThisFileDirectory)package-icon.png</PackageIconFullPath>
4444
<PackageProjectUrl>https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers</PackageProjectUrl>
4545
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
46+
<PackageReadmeFile>README.md</PackageReadmeFile>
4647
<RepositoryType>git</RepositoryType>
4748
<RepositoryUrl>git://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers</RepositoryUrl>
4849
</PropertyGroup>
@@ -53,6 +54,14 @@
5354
<EnableNETAnalyzers>true</EnableNETAnalyzers>
5455
</PropertyGroup>
5556

57+
<PropertyGroup Condition=" '$(IsPackable)' == 'true' ">
58+
<EnableAotAnalyzer>true</EnableAotAnalyzer>
59+
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
60+
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
61+
<IsAotCompatible>true</IsAotCompatible>
62+
<IsTrimmable>true</IsTrimmable>
63+
</PropertyGroup>
64+
5665
<PropertyGroup>
5766
<EnablePackageValidation>$(IsPackable)</EnablePackageValidation>
5867
</PropertyGroup>
@@ -84,4 +93,8 @@
8493
<Using Include="Microsoft.AspNetCore.Authentication" />
8594
</ItemGroup>
8695

96+
<ItemGroup>
97+
<None Include="$(MSBuildThisFileDirectory)$(PackageReadmeFile)" Pack="True" PackagePath="" />
98+
</ItemGroup>
99+
87100
</Project>

Directory.Packages.props

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<Project>
22

33
<ItemGroup>
4-
<PackageVersion Include="AngleSharp" Version="0.13.0" />
5-
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
6-
<PackageVersion Include="JustEat.HttpClientInterception" Version="3.1.2" />
4+
<PackageVersion Include="AngleSharp" Version="1.0.6" />
5+
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
6+
<PackageVersion Include="JustEat.HttpClientInterception" Version="4.0.0" />
77
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.3.0" />
8-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0" />
9-
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="7.0.0" />
10-
<PackageVersion Include="Microsoft.IdentityModel.Protocols" Version="6.10.0" />
11-
<PackageVersion Include="Shouldly" Version="4.1.0" />
12-
<PackageVersion Include="System.Text.Json" Version="7.0.0" />
8+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
9+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
10+
<PackageVersion Include="Microsoft.IdentityModel.Protocols" Version="7.0.3" />
11+
<PackageVersion Include="Shouldly" Version="4.2.1" />
1312
</ItemGroup>
1413

1514
</Project>

eng/Versions.props

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<Project>
22

33
<PropertyGroup>
4-
<MajorVersion>7</MajorVersion>
4+
<MajorVersion>8</MajorVersion>
55
<MinorVersion>0</MinorVersion>
6-
<PatchVersion>1</PatchVersion>
6+
<PatchVersion>0</PatchVersion>
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
8+
<!--
9+
TODO Change to 8.0.0 post-release
10+
-->
811
<PackageValidationBaselineVersion>7.0.0</PackageValidationBaselineVersion>
912
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
1013
<PreReleaseVersionIteration></PreReleaseVersionIteration>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"RetryCountLimit": 1,
3+
"RetryByAnyError": false
4+
}

eng/common/SetupNugetSources.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ if ($dotnet31Source -ne $null) {
153153
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
154154
}
155155

156-
$dotnetVersions = @('5','6','7')
156+
$dotnetVersions = @('5','6','7','8')
157157

158158
foreach ($dotnetVersion in $dotnetVersions) {
159159
$feedPrefix = "dotnet" + $dotnetVersion;

eng/common/SetupNugetSources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if [ "$?" == "0" ]; then
105105
PackageSources+=('dotnet3.1-internal-transport')
106106
fi
107107

108-
DotNetVersions=('5' '6' '7')
108+
DotNetVersions=('5' '6' '7' '8')
109109

110110
for DotNetVersion in ${DotNetVersions[@]} ; do
111111
FeedPrefix="dotnet${DotNetVersion}";

eng/common/cross/arm/sources.list.xenial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
88
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
99

1010
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11-
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse

eng/common/cross/arm/tizen-build-rootfs.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

eng/common/cross/arm/tizen-fetch.sh

Lines changed: 0 additions & 170 deletions
This file was deleted.

eng/common/cross/arm64/sources.list.xenial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
88
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
99

1010
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11-
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse

0 commit comments

Comments
 (0)