Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET 9 GA. Update some test dependencies. #3134

Merged
merged 19 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/aot-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
with:
fetch-depth: 1

- name: Setup .NET 9.0.x
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 9.0.x

- name: Runs powershell script
id: aot-powershell
run: build\test-aot.ps1 'net8.0'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- name: Setup .NET 8.0.x
- name: Setup .NET 9.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

# Install workload
- name: Setup wasm-tools
Expand All @@ -56,5 +56,8 @@ jobs:
- name: Build with .NET 8
run: dotnet test Microsoft.Identity.Web.sln -f net8.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"

- name: Build with .NET 9
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)"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
18 changes: 0 additions & 18 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4.2.1

- name: Setup .NET 6.0.x
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 6.0.x

- name: Setup .NET 7.0.x
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 7.0.x

- name: Setup .NET 8.0.x
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 8.0.x

- name: Setup .NET 9.0.x
pmaytak marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/setup-dotnet@v4.0.1
with:
Expand Down Expand Up @@ -91,9 +76,6 @@ jobs:
body: process.env.COMMENT_CONTENT_ENV_VAR
})

- name: Test with .NET 9.0.x
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net9.0 -v normal -p:FROM_GITHUB_ACTION=true -p:TargetNet9=True --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"

- name: Test with .NET 462
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net462 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)"

Expand Down
12 changes: 5 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<PropertyGroup>
<!-- For files to appear in the Visual Studio Solution explorer given we have conditional inclusion in some projects (IdWeb for instance)
we need to have the higher framework, even if this produces a warning in the IDE -->
<TargetFrameworks>net6.0; net7.0; net8.0; net462; net472; netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0; net462; net472; netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -42,9 +42,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'NET8_0_OR_GREATER'">
<EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
true
</EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
<EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>true</EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
</PropertyGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
Expand Down Expand Up @@ -92,8 +90,6 @@
<MicrosoftGraphBetaVersion>4.57.0-preview</MicrosoftGraphBetaVersion>
<MicrosoftExtensionsHttpVersion>3.1.3</MicrosoftExtensionsHttpVersion>
<MicrosoftIdentityAbstractionsVersion>7.2.0</MicrosoftIdentityAbstractionsVersion>
<NetNineRuntimeVersion>9.0.0-rc.2.24473.5</NetNineRuntimeVersion>
<AspNetCoreNineRuntimeVersion>9.0.0-rc.2.24474.3</AspNetCoreNineRuntimeVersion>
<!--CVE-2024-43485-->
<SystemTextJsonVersion>8.0.5</SystemTextJsonVersion>
<!--CVE-2023-29331-->
Expand All @@ -103,6 +99,8 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
<NetNineRuntimeVersion>9.0.0</NetNineRuntimeVersion>
<AspNetCoreNineRuntimeVersion>9.0.0</AspNetCoreNineRuntimeVersion>
<MicrosoftAspNetCoreAuthenticationJwtBearerVersion>$(AspNetCoreNineRuntimeVersion)</MicrosoftAspNetCoreAuthenticationJwtBearerVersion>
<MicrosoftAspNetCoreAuthenticationOpenIdConnectVersion>$(AspNetCoreNineRuntimeVersion)</MicrosoftAspNetCoreAuthenticationOpenIdConnectVersion>
<MicrosoftExtensionsCachingMemoryVersion>$(NetNineRuntimeVersion)</MicrosoftExtensionsCachingMemoryVersion>
Expand Down
25 changes: 2 additions & 23 deletions build/template-install-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,9 @@

steps:
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 3.1'
displayName: 'Use .NET SDK 9.0.x'
inputs:
version: 3.1.x

- task: UseDotNet@2
displayName: 'Use .Net Core SDK 6'
inputs:
version: 6.0.x

- task: UseDotNet@2
displayName: 'Use .Net Core SDK 7'
inputs:
version: 7.0.x

- task: UseDotNet@2
displayName: 'Use .Net Core SDK 8'
inputs:
version: 8.x

- task: UseDotNet@2
displayName: 'Use .Net Core SDK 9'
inputs:
version: 9.x
condition: eq(variables['TargetNet9'], 'True')
version: 9.0.x

# Run Nuget Tool Installer

Expand Down
2 changes: 0 additions & 2 deletions build/template-postbuild-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
displayName: 'Run Roslyn Analyzers'
condition: eq(variables['TargetNet9'], 'False')
inputs:
copyLogsOnly: true
env:
Expand All @@ -13,6 +12,5 @@ steps:

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Check Roslyn Results '
condition: eq(variables['TargetNet9'], 'False')
inputs:
RoslynAnalyzers: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>

<Title>Microsoft Identity Web, Microsoft Graph v5+ helper</Title>
Expand All @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Graph" Version="5.40.0" />
<PackageReference Include="Microsoft.Graph" Version="5.51.0" />
</ItemGroup>
pmaytak marked this conversation as resolved.
Show resolved Hide resolved

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Title>Microsoft Identity Web UI</Title>
<Product>Microsoft Identity Web UI</Product>
<Description>This package enables UI for ASP.NET Core Web apps that use Microsoft.Identity.Web.</Description>
<ProjectGuid>{C6CB0D5B-917A-4127-9984-7592C757BBDE}</ProjectGuid>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
Expand Down
6 changes: 3 additions & 3 deletions tests/DevApps/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>

<PropertyGroup>
<TargetFrameworks>net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<UseWip>true</UseWip>
<IsPackable>false</IsPackable>
<LangVersion>12</LangVersion>
Expand All @@ -24,7 +24,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
<SystemDrawingCommon>9.0.0-rc.2.24474.1</SystemDrawingCommon>
<SystemDrawingCommon>9.0.0</SystemDrawingCommon>
</PropertyGroup>

<ItemGroup>
Expand Down
36 changes: 15 additions & 21 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFrameworks>net6.0; net7.0; net8.0; net462; net472</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0; net462; net472</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<SignAssembly>True</SignAssembly>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Label="Common dependency versions">
<MicrosoftAspNetCoreMvcTestingVersion>7.0.0</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftNetTestSdkVersion>17.4.0</MicrosoftNetTestSdkVersion>
<!--GHSA-5crp-9r3c-p9vr-->
<NewtonsoftJsonVersion>13.0.2</NewtonsoftJsonVersion>
<XunitVersion>2.9.2</XunitVersion>
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
<MicrosoftAspNetCoreMvcTestingVersion>7.0.0</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftNetTestSdkVersion>17.11.1</MicrosoftNetTestSdkVersion>
<!--GHSA-5crp-9r3c-p9vr-->
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<XunitVersion>2.9.2</XunitVersion>
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
<XunitAssertVersion>2.9.2</XunitAssertVersion>
<XunitExtensibilityCoreVersion>2.9.2</XunitExtensibilityCoreVersion>
<NSubstituteVersion>4.2.2</NSubstituteVersion>
<NSubstituteAnalyzersCSharpVersion>1.0.13</NSubstituteAnalyzersCSharpVersion>
<CoverletCollectorVersion>6.0.2</CoverletCollectorVersion>
<NSubstituteVersion>5.3.0</NSubstituteVersion>
<NSubstituteAnalyzersCSharpVersion>1.0.17</NSubstituteAnalyzersCSharpVersion>
<CoverletCollectorVersion>6.0.2</CoverletCollectorVersion>
<SeleniumWebDriverVersion>4.8.0</SeleniumWebDriverVersion>
<SeleniumWebDriverChromeDriverVersion>108.0.5359.7100</SeleniumWebDriverChromeDriverVersion>
<BenchmarkDotNetVersion>0.12.1</BenchmarkDotNetVersion>
Expand All @@ -36,7 +36,7 @@
<MicrosoftIdentityLabApiVersion>1.0.2</MicrosoftIdentityLabApiVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<SystemTextRegularExpressions>4.3.1</SystemTextRegularExpressions>
</PropertyGroup>
</PropertyGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<DefineConstants>$(DefineConstants);AZURE_DEVOPS_BUILD</DefineConstants>
Expand All @@ -47,21 +47,15 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<MicrosoftAspNetCoreMvcTestingVersion>8.0.0-preview.5.23302.2</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftNetTestSdkVersion>17.6.3</MicrosoftNetTestSdkVersion>
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<MicrosoftAspNetCoreMvcTestingVersion>8.0.10</MicrosoftAspNetCoreMvcTestingVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
<MicrosoftAspNetCoreMvcTestingVersion>$(AspNetCoreNineRuntimeVersion)</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftNetTestSdkVersion>17.6.3</MicrosoftNetTestSdkVersion>
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<MicrosoftAspNetCoreMvcTestingVersion>9.0.0</MicrosoftAspNetCoreMvcTestingVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'NET8_0_OR_GREATER'">
<EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
true
</EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
<EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>true</EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<UserSecretsId>ce2cc20c-397d-48f2-9023-daf7c8550c53</UserSecretsId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<AssemblyOriginatorKeyFile>../../../build/MSAL.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/E2E Tests/WebAppUiTests/WebAppUiTests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<!--<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>-->
<TargetFrameworks>net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<AssemblyOriginatorKeyFile>../../../build/MSAL.snk</AssemblyOriginatorKeyFile>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462; net472; net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net462; net472; net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<IsPackable>false</IsPackable>

<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<CodeAnalysisRuleSet>..\..\..\.sonarlint\azuread_microsoft-identity-webcsharp.ruleset</CodeAnalysisRuleSet>
<AssemblyOriginatorKeyFile>../../../build/MSAL.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0; net7.0; net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet9)'== 'True'">$(TargetFrameworks); net9.0</TargetFrameworks>
<TargetFrameworks>net6.0; net7.0; net8.0; net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNetNext)'== 'True'">$(TargetFrameworks); </TargetFrameworks>
<CodeAnalysisRuleSet>..\..\..\.sonarlint\azuread_microsoft-identity-webcsharp.ruleset</CodeAnalysisRuleSet>
<AssemblyOriginatorKeyFile>../../../build/MSAL.snk</AssemblyOriginatorKeyFile>
<Nullable>disable</Nullable>
Expand Down
Loading