Skip to content

Commit

Permalink
Update to target .NET 8 (#808)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
martincostello committed Nov 14, 2023
1 parent 163a006 commit 5164ca0
Show file tree
Hide file tree
Showing 287 changed files with 2,382 additions and 3,673 deletions.
24 changes: 22 additions & 2 deletions Directory.Build.props
Expand Up @@ -3,7 +3,7 @@
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<PropertyGroup>
<DefaultNetCoreTargetFramework>net7.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework>
<LangVersion>latest</LangVersion>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down Expand Up @@ -42,6 +42,7 @@
<PackageIconFullPath>$(MSBuildThisFileDirectory)package-icon.png</PackageIconFullPath>
<PackageProjectUrl>https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers</RepositoryUrl>
</PropertyGroup>
Expand All @@ -65,12 +66,27 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsPackable)' == 'true' ">
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsAotCompatible>true</IsAotCompatible>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<PropertyGroup>
<EnablePackageValidation>$(IsPackable)</EnablePackageValidation>
</PropertyGroup>

<!--
TODO Remove after 8.0.0 release
-->
<PropertyGroup>
<NoWarn>$(NoWarn);PKV006</NoWarn>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" Visible="false" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
</ItemGroup>

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

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)$(PackageReadmeFile)" Pack="True" PackagePath="" Visible="false" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions Directory.Packages.props
@@ -1,16 +1,16 @@
<Project>

<ItemGroup>
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageVersion Include="JustEat.HttpClientInterception" Version="3.1.2" />
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageVersion Include="JustEat.HttpClientInterception" Version="4.0.0" />
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.3.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="7.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="7.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.16.0" />
<PackageVersion Include="NSubstitute" Version="5.0.0" />
<PackageVersion Include="Shouldly" Version="4.1.0" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.0.3" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
</ItemGroup>

</Project>
7 changes: 5 additions & 2 deletions eng/Versions.props
@@ -1,10 +1,13 @@
<Project>

<PropertyGroup>
<MajorVersion>7</MajorVersion>
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<PatchVersion>5</PatchVersion>
<PatchVersion>0</PatchVersion>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<!--
TODO Change to 8.0.0 post-release
-->
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">7.0.0</PackageValidationBaselineVersion>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration></PreReleaseVersionIteration>
Expand Down
4 changes: 4 additions & 0 deletions eng/common/BuildConfiguration/build-configuration.json
@@ -0,0 +1,4 @@
{
"RetryCountLimit": 1,
"RetryByAnyError": false
}
2 changes: 1 addition & 1 deletion eng/common/SetupNugetSources.ps1
Expand Up @@ -153,7 +153,7 @@ if ($dotnet31Source -ne $null) {
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
}

$dotnetVersions = @('5','6','7')
$dotnetVersions = @('5','6','7','8')

foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
Expand Down
2 changes: 1 addition & 1 deletion eng/common/SetupNugetSources.sh
Expand Up @@ -105,7 +105,7 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi

DotNetVersions=('5' '6' '7')
DotNetVersions=('5' '6' '7' '8')

for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
Expand Down
2 changes: 1 addition & 1 deletion eng/common/cross/arm/sources.list.xenial
Expand Up @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
35 changes: 0 additions & 35 deletions eng/common/cross/arm/tizen-build-rootfs.sh

This file was deleted.

170 changes: 0 additions & 170 deletions eng/common/cross/arm/tizen-fetch.sh

This file was deleted.

2 changes: 1 addition & 1 deletion eng/common/cross/arm64/sources.list.xenial
Expand Up @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted

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

0 comments on commit 5164ca0

Please sign in to comment.