Skip to content

Commit 9b1441a

Browse files
CopilotpmaytakKeegan Carusokeegan-caruso
authored
Migrate to .NET 10 GA (#3590)
* Update configuration files for .NET 10 GA support Co-authored-by: pmaytak <[email protected]> * Resolve NU1510 * Attempt to use dotnet msbuild * net 10 target for tests * Update Directory.Build.props * Update Directory.Build.props --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: pmaytak <[email protected]> Co-authored-by: Keegan Caruso <[email protected]> Co-authored-by: Keegan <[email protected]>
1 parent 04e4d30 commit 9b1441a

File tree

8 files changed

+23
-54
lines changed

8 files changed

+23
-54
lines changed

.github/workflows/aot-check.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
branches: [ "master", "rel/v2" ]
1313

1414
env:
15-
TargetNetNext: True
15+
TargetNetNext: False
1616

1717
jobs:
1818
analyze:
@@ -30,19 +30,16 @@ jobs:
3030
with:
3131
dotnet-version: 9.0.x
3232

33-
- name: Setup .NET 10.0 RC1
34-
if: env.TargetNetNext == 'True'
35-
uses: actions/setup-dotnet@v4
33+
- name: Setup .NET 10.0.x
34+
uses: actions/setup-dotnet@v5
3635
with:
37-
dotnet-version: 10.0.100-rc.1.25451.107
36+
dotnet-version: 10.0.x
3837

3938
- name: Runs AOT check with .NET 9.0
4039
id: aot-powershell-net9
4140
run: build\test-aot.ps1 'net9.0'
4241

4342
- name: Runs AOT check with .NET 10.0
4443
id: aot-powershell-net10
45-
if: env.TargetNetNext == 'True'
4644
run: build\test-aot.ps1 'net10.0'
47-
continue-on-error: true
4845

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- master
1515

1616
env:
17-
TargetNetNext: 'True'
17+
TargetNetNext: 'False'
1818

1919
jobs:
2020
analyse:
@@ -57,11 +57,10 @@ jobs:
5757
with:
5858
dotnet-version: 9.0.x
5959

60-
- name: Setup .NET 10.0 RC1
61-
uses: actions/setup-dotnet@v4
62-
if: env.TargetNetNext == 'True'
60+
- name: Setup .NET 10.0.x
61+
uses: actions/setup-dotnet@v5
6362
with:
64-
dotnet-version: 10.0.100-rc.1.25451.107
63+
dotnet-version: 10.0.x
6564

6665
# Install workload
6766
- name: Setup wasm-tools
@@ -74,9 +73,7 @@ jobs:
7473
run: dotnet test Microsoft.Identity.Web.sln -f net9.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
7574

7675
- name: Build with .NET 10
77-
if: env.TargetNetNext == 'True'
78-
run: dotnet test Microsoft.Identity.Web.sln -f net10.0 -p:FROM_GITHUB_ACTION=true -p:TargetNetNext=${{env.TargetNetNext}} --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
79-
continue-on-error: true
76+
run: dotnet test Microsoft.Identity.Web.sln -f net10.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
8077

8178
- name: Perform CodeQL Analysis
8279
uses: github/codeql-action/analyze@v3

.github/workflows/dotnetcore.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- master
1919

2020
env:
21-
TargetNetNext: 'True'
21+
TargetNetNext: 'False'
2222

2323
jobs:
2424
build:
@@ -36,11 +36,10 @@ jobs:
3636
with:
3737
dotnet-version: 9.0.x
3838

39-
- name: Setup .NET 10.0 RC1
40-
if: env.TargetNetNext == 'True'
41-
uses: actions/setup-dotnet@v4
39+
- name: Setup .NET 10.0.x
40+
uses: actions/setup-dotnet@v5
4241
with:
43-
dotnet-version: 10.0.100-rc.1.25451.107
42+
dotnet-version: 10.0.x
4443

4544
- name: 'Setup MSBuild'
4645
uses: microsoft/setup-msbuild@v2
@@ -51,7 +50,7 @@ jobs:
5150
run: dotnet workload install wasm-tools
5251

5352
- name: Build solution
54-
run: msbuild Microsoft.Identity.Web.sln -r -t:build -verbosity:m -property:Configuration=Release -property:TargetNetNext=${{env.TargetNetNext}}
53+
run: dotnet msbuild Microsoft.Identity.Web.sln -r -t:build -verbosity:m -property:Configuration=Release
5554

5655
- name: Test with .NET 8.0.x
5756
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net8.0 -v m -p:FROM_GITHUB_ACTION=true --configuration Release --collect "Xplat Code Coverage" --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)&(FullyQualifiedName!~AgentApplicationsTests)"
@@ -61,9 +60,7 @@ jobs:
6160

6261

6362
- name: Test with .NET 10.0.x
64-
if: env.TargetNetNext == 'True'
65-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net10.0 -v m -p:FROM_GITHUB_ACTION=true -p:TargetNetNext=${{env.TargetNetNext}} --configuration Release --collect "Xplat Code Coverage" --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
66-
continue-on-error: true
63+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net10.0 -v m -p:FROM_GITHUB_ACTION=true --configuration Release --collect "Xplat Code Coverage" --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
6764

6865
- name: Create code coverage report
6966
run: |

Directory.Build.props

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,11 @@
2626
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2727
</PropertyGroup>
2828

29-
<!-- Uncomment this property group to build with NET 10.0 locally or set TargetNetNext to True in a CLI arg-->
30-
<!-- <PropertyGroup>
31-
<TargetNetNext>True</TargetNetNext>
32-
</PropertyGroup> -->
3329

3430
<PropertyGroup>
3531
<!-- For files to appear in the Visual Studio Solution explorer given we have conditional inclusion in some projects (IdWeb for instance)
3632
we need to have the higher framework, even if this produces a warning in the IDE -->
37-
<TargetFrameworks>net8.0; net9.0; net462; net472; netstandard2.0</TargetFrameworks>
38-
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); net10.0</TargetFrameworks>
33+
<TargetFrameworks>net8.0; net9.0; net10.0; net462; net472; netstandard2.0</TargetFrameworks>
3934
<SignAssembly>true</SignAssembly>
4035
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
4136
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -46,15 +41,6 @@
4641
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4742
</PropertyGroup>
4843

49-
<PropertyGroup Condition="'$(TargetNetNext)' == 'True'">
50-
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
51-
<!-- Compiling w/ Net 10.0 SDK gives the NU1510 warning in every net core version "PackageReference System.Formats.Asn1 will not be pruned.
52-
Consider removing this package from your dependencies, as it is likely unnecessary." However, the ref is necessary due to Microsoft Security Advisory CVE-2024-38095.
53-
For NU5104 it prevents us from packing release packages with prerelease dependencies. But we want to do that so customers can get a preview of running with .NET 10. -->
54-
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1510;NU5104</WarningsNotAsErrors>
55-
<NoWarn>$(NoWarn);NU1510;NU5104</NoWarn>
56-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
57-
</PropertyGroup>
5844

5945
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
6046
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
@@ -67,7 +53,7 @@
6753
</None>
6854
</ItemGroup>
6955

70-
<ItemGroup Label="Build Tools" Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(TargetFramework)' != 'net8.0' and '$(TargetFramework)' != 'net9.0'">
56+
<ItemGroup Label="Build Tools" Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(TargetFramework)' != 'net8.0' and '$(TargetFramework)' != 'net9.0' and '$(TargetFramework)' != 'net10.0'">
7157
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
7258
</ItemGroup>
7359

@@ -132,8 +118,8 @@
132118
</PropertyGroup>
133119

134120
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
135-
<NetTenRuntimeVersion>10.0.0-rc.1.25451.107</NetTenRuntimeVersion>
136-
<AspNetCoreTenRuntimeVersion>10.0.0-rc.1.25451.107</AspNetCoreTenRuntimeVersion>
121+
<NetTenRuntimeVersion>10.0.0</NetTenRuntimeVersion>
122+
<AspNetCoreTenRuntimeVersion>10.0.0</AspNetCoreTenRuntimeVersion>
137123
<MicrosoftAspNetCoreAuthenticationJwtBearerVersion>$(AspNetCoreTenRuntimeVersion)</MicrosoftAspNetCoreAuthenticationJwtBearerVersion>
138124
<MicrosoftAspNetCoreAuthenticationOpenIdConnectVersion>$(AspNetCoreTenRuntimeVersion)</MicrosoftAspNetCoreAuthenticationOpenIdConnectVersion>
139125
<MicrosoftExtensionsCachingMemoryVersion>$(NetTenRuntimeVersion)</MicrosoftExtensionsCachingMemoryVersion>

benchmark/Benchmarks.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<ItemGroup>
1414
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
1515
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="$(BenchmarkDotNetDiagnosticsWindowsVersion)" />
16-
<PackageReference Include="System.Text.RegularExpressions" Version="$(SystemTextRegularExpressionsVersion)" />
1716
</ItemGroup>
1817

1918
<ItemGroup>

build/template-install-dependencies.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ steps:
2828
inputs:
2929
useGlobalJson: true
3030

31-
- task: UseDotNet@2
32-
displayName: 'Use .NET SDK 10.0 RC1'
33-
inputs:
34-
version: 10.0.100-rc.1.25451.107
35-
useGlobalJson: false
36-
includePreviewVersions: true
37-
3831
# Run Nuget Tool Installer
3932

4033
- task: NuGetToolInstaller@1

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Microsoft.Build.NoTargets": "3.7.56"
44
},
55
"sdk": {
6-
"version": "9.0.111",
7-
"allowPrerelease": true,
8-
"rollForward": "latestMajor"
6+
"version": "10.0.100",
7+
"allowPrerelease": false,
8+
"rollForward": "latestFeature"
99
}
1010
}

tests/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
33
<PropertyGroup>
44
<GenerateDocumentationFile>false</GenerateDocumentationFile>
5-
<TargetFrameworks>net8.0; net9.0; net462; net472</TargetFrameworks>
5+
<TargetFrameworks>net8.0; net9.0; net10.0; net462; net472</TargetFrameworks>
66
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); net10.0</TargetFrameworks>
77
<SignAssembly>True</SignAssembly>
88
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)