Skip to content

Commit 5164ca0

Browse files
Update to target .NET 8 (#808)
- Update to ASP.NET Core 8. - Add a README file to the NuGet packages as recommended by the .NET 8 SDK. - Remove obsolete TODO. - Remove usage of `ISystemClock` and use `TimeProvider` instead. - Suppress `CA1861` in tests. - Apply some style suggestions from Visual Studio. - Use `AuthenticationFailureException` where relevant. - Use `ArgumentException.ThrowIfNullOrWhiteSpace()` where relevant. - Specify value with `ArgumentOutOfRangeException` where relevant. - Suppress `CA1863` warnings to use `CompositeFormat`. - Use `JsonDocument.ParseAsync()` where relevant. - Remove `ISystemClock`. - Suppress `CA1863`. - Remove obsolete members for the EVE Online provider. - Use primary constructors where relevant. - Use collection literals where relevant. - Add helper method to reduce duplicative tests. - Apply some IDE suggestions. - Remove redundant using statements. - Fix some typos. - Hide shared files from the Visual Studio project explorer. - Use collection literals for string arrays. - Update to the latest release of arcade for .NET 8. - Update NuGet packages to their latest versions. - Fix obsolete warnings. - Fix StyleCop warning. - Fix tests after update to Wilson 7.0.0. - 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. - Add support for native AoT for the libraries. - Trim off all the fractions of a second before comparing. - Remove redundant casts. - Fix query string parameters being duplicated if `AuthorizationEndpoint` contains any user-added query string parameters. - Use unified BattleNet server
1 parent 163a006 commit 5164ca0

File tree

287 files changed

+2382
-3673
lines changed

Some content is hidden

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

287 files changed

+2382
-3673
lines changed

Directory.Build.props

Lines changed: 22 additions & 2 deletions
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>
@@ -42,6 +42,7 @@
4242
<PackageIconFullPath>$(MSBuildThisFileDirectory)package-icon.png</PackageIconFullPath>
4343
<PackageProjectUrl>https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers</PackageProjectUrl>
4444
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
45+
<PackageReadmeFile>README.md</PackageReadmeFile>
4546
<RepositoryType>git</RepositoryType>
4647
<RepositoryUrl>git://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers</RepositoryUrl>
4748
</PropertyGroup>
@@ -65,12 +66,27 @@
6566
<EnableNETAnalyzers>true</EnableNETAnalyzers>
6667
</PropertyGroup>
6768

69+
<PropertyGroup Condition=" '$(IsPackable)' == 'true' ">
70+
<EnableAotAnalyzer>true</EnableAotAnalyzer>
71+
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
72+
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
73+
<IsAotCompatible>true</IsAotCompatible>
74+
<IsTrimmable>true</IsTrimmable>
75+
</PropertyGroup>
76+
6877
<PropertyGroup>
6978
<EnablePackageValidation>$(IsPackable)</EnablePackageValidation>
7079
</PropertyGroup>
7180

81+
<!--
82+
TODO Remove after 8.0.0 release
83+
-->
84+
<PropertyGroup>
85+
<NoWarn>$(NoWarn);PKV006</NoWarn>
86+
</PropertyGroup>
87+
7288
<ItemGroup>
73-
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
89+
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" Visible="false" />
7490
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
7591
</ItemGroup>
7692

@@ -89,4 +105,8 @@
89105
<Using Include="Microsoft.AspNetCore.Authentication.OAuth" />
90106
</ItemGroup>
91107

108+
<ItemGroup>
109+
<None Include="$(MSBuildThisFileDirectory)$(PackageReadmeFile)" Pack="True" PackagePath="" Visible="false" />
110+
</ItemGroup>
111+
92112
</Project>

Directory.Packages.props

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project>
22

33
<ItemGroup>
4-
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
5-
<PackageVersion Include="JustEat.HttpClientInterception" Version="3.1.2" />
4+
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
5+
<PackageVersion Include="JustEat.HttpClientInterception" Version="4.0.0" />
66
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.3.0" />
7-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="7.0.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.OpenIdConnect" Version="6.16.0" />
11-
<PackageVersion Include="NSubstitute" Version="5.0.0" />
12-
<PackageVersion Include="Shouldly" Version="4.1.0" />
13-
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
7+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="8.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.OpenIdConnect" Version="7.0.3" />
11+
<PackageVersion Include="NSubstitute" Version="5.1.0" />
12+
<PackageVersion Include="Shouldly" Version="4.2.1" />
13+
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
1414
</ItemGroup>
1515

1616
</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>5</PatchVersion>
6+
<PatchVersion>0</PatchVersion>
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
8+
<!--
9+
TODO Change to 8.0.0 post-release
10+
-->
811
<PackageValidationBaselineVersion Condition="'$(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)