From 101e9c241d637f9413629b881d1aae26f3496bc9 Mon Sep 17 00:00:00 2001 From: Westin Musser <127992899+westin-m@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:07:04 -0700 Subject: [PATCH] Conditionally target net 8 (#2318) --- .github/workflows/dotnetcore.yml | 8 +++++ Directory.Build.props | 30 +++++++++++++--- build/template-install-dependencies.yaml | 7 ++++ build/template-postbuild-code-analysis.yaml | 2 ++ .../template-restore-build-MSIdentityWeb.yaml | 11 +++--- .../MergedOptions.cs | 4 ++- ...osoft.Identity.Web.TokenAcquisition.csproj | 6 ++-- .../Microsoft.Identity.Web.TokenCache.csproj | 2 +- .../AppServicesAuthenticationHandler.cs | 15 ++++---- .../Microsoft.Identity.Web.csproj | 4 +-- ...tyWebAppAuthenticationBuilderExtensions.cs | 3 ++ tests/DevApps/Directory.Build.props | 3 +- .../Client/TodoListClient.csproj | 6 ++-- .../TodoListService/TodoListService.csproj | 6 ++-- .../gRPC/grpc.csproj | 2 +- tests/Directory.Build.props | 23 +++++++++--- .../IntegrationTestService.csproj | 3 +- .../TokenAcquirerTests.csproj | 3 +- .../WebAppUiTests/WebAppUiTests.csproj | 9 ++--- .../Microsoft.Identity.Web.Test.Common.csproj | 5 +-- ...osoft.Identity.Web.Test.Integration.csproj | 4 +-- ...Identity.Web.Test.LabInfrastructure.csproj | 3 +- .../Microsoft.Identity.Web.Test.csproj | 4 +-- .../WebApiExtensionsTests.cs | 35 ++++++++++++++++++- .../WebAppExtensionsTests.cs | 9 +++-- ...crosoft.Identity.Web.Perf.Benchmark.csproj | 3 +- .../Microsoft.Identity.Web.Perf.Client.csproj | 3 +- .../PerformanceTestService.csproj | 3 +- .../app-provisioning-lib.csproj | 2 +- 29 files changed, 159 insertions(+), 59 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 8540b2698..07bb2e52d 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -35,6 +35,11 @@ jobs: uses: actions/setup-dotnet@v2.1.0 with: dotnet-version: 7.0.x + + - name: Setup .NET 8.0.x + uses: actions/setup-dotnet@v2.1.0 + with: + dotnet-version: 8.0.100-preview.6.23330.14 # Install workload - name: Setup wasm-tools @@ -45,3 +50,6 @@ jobs: - name: Build with .NET 7.0.x run: dotnet test Microsoft.Identity.Web.sln -f net7.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)" + + - name: Build with .NET 8.0.x + 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)" diff --git a/Directory.Build.props b/Directory.Build.props index dd2df12ff..461959426 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,7 +20,8 @@ - net6.0; net7.0; net462; net472; netstandard2.0; netcoreapp3.1 + net6.0; net7.0; net8.0; net462; net472; netstandard2.0; netcoreapp3.1 + net6.0; net7.0; net462; net472; netstandard2.0; netcoreapp3.1 true ../../build/MSAL.snk true @@ -29,9 +30,15 @@ true - + true + + + + true + + true @@ -44,7 +51,7 @@ - + @@ -58,7 +65,7 @@ false - + 10.0 @@ -78,6 +85,21 @@ 4.7.2 + + 7.0.0-preview + 8.0.0-preview.6.23329.11 + 8.0.0-preview.6.23329.11 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.11 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + 8.0.0-preview.6.23329.7 + + 7.0.1 7.0.1 diff --git a/build/template-install-dependencies.yaml b/build/template-install-dependencies.yaml index a2d77bcd8..ceb028661 100644 --- a/build/template-install-dependencies.yaml +++ b/build/template-install-dependencies.yaml @@ -18,6 +18,13 @@ steps: inputs: version: 7.0.x +- task: UseDotNet@2 + displayName: 'Use .Net Core SDK 8' + inputs: + version: 8.x + includePreviewVersions: true + condition: eq(variables['TargetNet8'], 'True') + # Run Nuget Tool Installer - task: NuGetToolInstaller@1 diff --git a/build/template-postbuild-code-analysis.yaml b/build/template-postbuild-code-analysis.yaml index 0c1c424ea..eee7e9412 100644 --- a/build/template-postbuild-code-analysis.yaml +++ b/build/template-postbuild-code-analysis.yaml @@ -4,6 +4,7 @@ steps: - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Run Roslyn Analyzers' + condition: eq(variables['TargetNet8'], 'False') inputs: userProvideBuildInfo: auto env: @@ -12,5 +13,6 @@ steps: - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2 displayName: 'Check Roslyn Results ' + condition: eq(variables['TargetNet8'], 'False') inputs: RoslynAnalyzers: true diff --git a/build/template-restore-build-MSIdentityWeb.yaml b/build/template-restore-build-MSIdentityWeb.yaml index 18b76e8d3..174ca5009 100644 --- a/build/template-restore-build-MSIdentityWeb.yaml +++ b/build/template-restore-build-MSIdentityWeb.yaml @@ -20,13 +20,12 @@ steps: # This task is needed so that the 1CS Rolsyn analyzers task works. # The previous task does the restore -- task: VSBuild@1 +- task: DotNetCoreCLI@2 displayName: 'Build solution Microsoft.Identity.Web.sln for governance' inputs: - solution: Microsoft.Identity.Web.sln - msbuildArgs: '/p:RunCodeAnalysis=false /p:MsIdentityWebSemVer=${{ parameters.MsIdentityWebSemVer }} /p:SourceLinkCreate=true' - platform: ${{ parameters.BuildPlatform }} - configuration: ${{ parameters.BuildConfiguration }} + command: build + project: Microsoft.Identity.Web.sln + arguments: '--configuration ${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=false -p:MsIdentityWebSemVer=${{ parameters.MsIdentityWebSemVer }} -p:SourceLinkCreate=true' - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' @@ -34,4 +33,4 @@ steps: failOnAlert: true scanType: 'Register' verbosity: 'Verbose' - alertWarningLevel: 'High' \ No newline at end of file + alertWarningLevel: 'High' diff --git a/src/Microsoft.Identity.Web.TokenAcquisition/MergedOptions.cs b/src/Microsoft.Identity.Web.TokenAcquisition/MergedOptions.cs index 8e86bdf98..6cf218612 100644 --- a/src/Microsoft.Identity.Web.TokenAcquisition/MergedOptions.cs +++ b/src/Microsoft.Identity.Web.TokenAcquisition/MergedOptions.cs @@ -205,7 +205,9 @@ internal static void UpdateMergedOptionsFromMicrosoftIdentityOptions(MicrosoftId mergedOptions.SkipUnrecognizedRequests |= microsoftIdentityOptions.SkipUnrecognizedRequests; mergedOptions.StateDataFormat ??= microsoftIdentityOptions.StateDataFormat; mergedOptions.StringDataFormat ??= microsoftIdentityOptions.StringDataFormat; - +#if NET8_0_OR_GREATER + mergedOptions.TimeProvider = microsoftIdentityOptions.TimeProvider; +#endif mergedOptions.TokenValidationParameters = microsoftIdentityOptions.TokenValidationParameters.Clone(); mergedOptions.UsePkce |= microsoftIdentityOptions.UsePkce; diff --git a/src/Microsoft.Identity.Web.TokenAcquisition/Microsoft.Identity.Web.TokenAcquisition.csproj b/src/Microsoft.Identity.Web.TokenAcquisition/Microsoft.Identity.Web.TokenAcquisition.csproj index 3b63f690e..8ab27661e 100644 --- a/src/Microsoft.Identity.Web.TokenAcquisition/Microsoft.Identity.Web.TokenAcquisition.csproj +++ b/src/Microsoft.Identity.Web.TokenAcquisition/Microsoft.Identity.Web.TokenAcquisition.csproj @@ -8,13 +8,13 @@ true - + - + @@ -34,7 +34,7 @@ - + diff --git a/src/Microsoft.Identity.Web.TokenCache/Microsoft.Identity.Web.TokenCache.csproj b/src/Microsoft.Identity.Web.TokenCache/Microsoft.Identity.Web.TokenCache.csproj index 035b8aef5..6c0bfb7cb 100644 --- a/src/Microsoft.Identity.Web.TokenCache/Microsoft.Identity.Web.TokenCache.csproj +++ b/src/Microsoft.Identity.Web.TokenCache/Microsoft.Identity.Web.TokenCache.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationHandler.cs b/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationHandler.cs index 83235bc47..3c421f589 100644 --- a/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationHandler.cs +++ b/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationHandler.cs @@ -15,20 +15,19 @@ namespace Microsoft.Identity.Web /// public class AppServicesAuthenticationHandler : AuthenticationHandler { - /// - /// Constructor for the AppServiceAuthenticationHandler. - /// Note the parameters are required by the base class. - /// - /// App service authentication options. - /// Logger factory. - /// URL encoder. - /// System clock. + /// + ///Note the parameters are required by the base class. public AppServicesAuthenticationHandler( IOptionsMonitor options, ILoggerFactory logger, +#if NET8_0_OR_GREATER + UrlEncoder encoder) + : base(options, logger, encoder) +#else UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) +#endif { } diff --git a/src/Microsoft.Identity.Web/Microsoft.Identity.Web.csproj b/src/Microsoft.Identity.Web/Microsoft.Identity.Web.csproj index fcea699e4..2980a1456 100644 --- a/src/Microsoft.Identity.Web/Microsoft.Identity.Web.csproj +++ b/src/Microsoft.Identity.Web/Microsoft.Identity.Web.csproj @@ -13,7 +13,7 @@ true - + @@ -26,7 +26,7 @@ - + diff --git a/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs b/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs index 34c850d7b..65d9b109f 100644 --- a/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs +++ b/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs @@ -521,6 +521,9 @@ internal static void PopulateOpenIdOptionsFromMergedOptions( options.ForwardSignIn = mergedOptions.ForwardSignIn; options.ForwardSignOut = mergedOptions.ForwardSignOut; options.ForwardDefaultSelector = mergedOptions.ForwardDefaultSelector; +#if NET8_0_OR_GREATER + options.TimeProvider = mergedOptions.TimeProvider; +#endif } } } diff --git a/tests/DevApps/Directory.Build.props b/tests/DevApps/Directory.Build.props index 6cdfa7038..9f6fb870e 100644 --- a/tests/DevApps/Directory.Build.props +++ b/tests/DevApps/Directory.Build.props @@ -1,7 +1,8 @@ - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 true false diff --git a/tests/DevApps/WebAppCallsWebApiCallsGraph/Client/TodoListClient.csproj b/tests/DevApps/WebAppCallsWebApiCallsGraph/Client/TodoListClient.csproj index ff7a97f89..40275dd37 100644 --- a/tests/DevApps/WebAppCallsWebApiCallsGraph/Client/TodoListClient.csproj +++ b/tests/DevApps/WebAppCallsWebApiCallsGraph/Client/TodoListClient.csproj @@ -21,9 +21,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/DevApps/WebAppCallsWebApiCallsGraph/TodoListService/TodoListService.csproj b/tests/DevApps/WebAppCallsWebApiCallsGraph/TodoListService/TodoListService.csproj index 29bbcbc8a..60181634a 100644 --- a/tests/DevApps/WebAppCallsWebApiCallsGraph/TodoListService/TodoListService.csproj +++ b/tests/DevApps/WebAppCallsWebApiCallsGraph/TodoListService/TodoListService.csproj @@ -9,15 +9,15 @@ - - + + - + diff --git a/tests/DevApps/WebAppCallsWebApiCallsGraph/gRPC/grpc.csproj b/tests/DevApps/WebAppCallsWebApiCallsGraph/gRPC/grpc.csproj index f602a789d..69311bbdc 100644 --- a/tests/DevApps/WebAppCallsWebApiCallsGraph/gRPC/grpc.csproj +++ b/tests/DevApps/WebAppCallsWebApiCallsGraph/gRPC/grpc.csproj @@ -5,7 +5,7 @@ - + diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index c307bd3a4..bda94b143 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -2,10 +2,11 @@ false - net6.0; net7.0; net462; net472 - True - false - ../../build/MSAL.snk + net6.0; net7.0; net8.0; net462; net472 + net6.0; net7.0; net462; net472 + True + false + ../../build/MSAL.snk 10.0 @@ -37,7 +38,19 @@ - 6.0.12 + 6.0.12 + + 8.0.0-preview.5.23302.2 + 17.6.3 + 13.0.3 + + + + + true + + + diff --git a/tests/IntegrationTests/IntegrationTestService/IntegrationTestService.csproj b/tests/IntegrationTests/IntegrationTestService/IntegrationTestService.csproj index 10604f691..be74ced2b 100644 --- a/tests/IntegrationTests/IntegrationTestService/IntegrationTestService.csproj +++ b/tests/IntegrationTests/IntegrationTestService/IntegrationTestService.csproj @@ -1,7 +1,8 @@  - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 false true ce2cc20c-397d-48f2-9023-daf7c8550c53 diff --git a/tests/IntegrationTests/TokenAcquirerTests/TokenAcquirerTests.csproj b/tests/IntegrationTests/TokenAcquirerTests/TokenAcquirerTests.csproj index 8155b7fb7..3f4c24145 100644 --- a/tests/IntegrationTests/TokenAcquirerTests/TokenAcquirerTests.csproj +++ b/tests/IntegrationTests/TokenAcquirerTests/TokenAcquirerTests.csproj @@ -1,7 +1,8 @@  - net7.0 + net7.0; net8.0 + net7.0 ../../../build/MSAL.snk diff --git a/tests/IntegrationTests/WebAppUiTests/WebAppUiTests.csproj b/tests/IntegrationTests/WebAppUiTests/WebAppUiTests.csproj index d83b60a2e..dec6e432f 100644 --- a/tests/IntegrationTests/WebAppUiTests/WebAppUiTests.csproj +++ b/tests/IntegrationTests/WebAppUiTests/WebAppUiTests.csproj @@ -1,9 +1,10 @@  - - net6.0; net7.0 - ../../../build/MSAL.snk - false + + net6.0; net7.0; net8.0 + net6.0; net7.0 + ../../../build/MSAL.snk + false diff --git a/tests/Microsoft.Identity.Web.Test.Common/Microsoft.Identity.Web.Test.Common.csproj b/tests/Microsoft.Identity.Web.Test.Common/Microsoft.Identity.Web.Test.Common.csproj index 875d8453a..b0f95eb77 100644 --- a/tests/Microsoft.Identity.Web.Test.Common/Microsoft.Identity.Web.Test.Common.csproj +++ b/tests/Microsoft.Identity.Web.Test.Common/Microsoft.Identity.Web.Test.Common.csproj @@ -1,7 +1,8 @@  - net462; net472; net6.0; net7.0 + net462; net472; net6.0; net7.0; net8.0 + net462; net472; net6.0; net7.0 false true ../../build/MSAL.snk @@ -16,7 +17,7 @@ - + diff --git a/tests/Microsoft.Identity.Web.Test.Integration/Microsoft.Identity.Web.Test.Integration.csproj b/tests/Microsoft.Identity.Web.Test.Integration/Microsoft.Identity.Web.Test.Integration.csproj index 254f7f10a..55f236889 100644 --- a/tests/Microsoft.Identity.Web.Test.Integration/Microsoft.Identity.Web.Test.Integration.csproj +++ b/tests/Microsoft.Identity.Web.Test.Integration/Microsoft.Identity.Web.Test.Integration.csproj @@ -1,8 +1,8 @@  - net6.0; net7.0 - + net6.0; net7.0; net8.0 + net6.0; net7.0 false true diff --git a/tests/Microsoft.Identity.Web.Test.LabInfrastructure/Microsoft.Identity.Web.Test.LabInfrastructure.csproj b/tests/Microsoft.Identity.Web.Test.LabInfrastructure/Microsoft.Identity.Web.Test.LabInfrastructure.csproj index 045a29fa0..e73c82d9e 100644 --- a/tests/Microsoft.Identity.Web.Test.LabInfrastructure/Microsoft.Identity.Web.Test.LabInfrastructure.csproj +++ b/tests/Microsoft.Identity.Web.Test.LabInfrastructure/Microsoft.Identity.Web.Test.LabInfrastructure.csproj @@ -1,7 +1,8 @@  - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 false true ../../build/MSAL.snk diff --git a/tests/Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj b/tests/Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj index c366de812..a3b1afbaf 100644 --- a/tests/Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj +++ b/tests/Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj @@ -8,7 +8,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/tests/Microsoft.Identity.Web.Test/WebApiExtensionsTests.cs b/tests/Microsoft.Identity.Web.Test/WebApiExtensionsTests.cs index 44cea84e5..df8c9eb91 100644 --- a/tests/Microsoft.Identity.Web.Test/WebApiExtensionsTests.cs +++ b/tests/Microsoft.Identity.Web.Test/WebApiExtensionsTests.cs @@ -50,8 +50,11 @@ public WebApiExtensionsTests() { _configSection = GetConfigSection(ConfigSectionName); } - +#if NET8_0 + [Fact(Skip = "Need to Adjust with .Net 8, see https://github.com/AzureAD/microsoft-identity-web/issues/2310")] +#else [Fact] +#endif public void AddMicrosoftIdentityWebApi_WithConfigName() { var config = Substitute.For(); @@ -74,7 +77,11 @@ public void AddMicrosoftIdentityWebApi_WithConfigName() AddMicrosoftIdentityWebApi_TestCommon(services, provider, false); } +#if NET8_0 + [Fact(Skip = "Need to Adjust with .Net 8, see https://github.com/AzureAD/microsoft-identity-web/issues/2310")] +#else [Fact] +#endif public void AddMicrosoftIdentityWebApi_WithConfigActions() { var config = Substitute.For(); @@ -97,7 +104,11 @@ public void AddMicrosoftIdentityWebApi_WithConfigActions() AddMicrosoftIdentityWebApi_TestCommon(services, provider); } +#if NET8_0 + [Fact(Skip = "Need to Adjust with .Net 8, see https://github.com/AzureAD/microsoft-identity-web/issues/2310")] +#else [Fact] +#endif public void AddMicrosoftIdentityWebApiAuthentication_WithConfigName() { var config = Substitute.For(); @@ -143,9 +154,17 @@ private void AddMicrosoftIdentityWebApi_TestCommon(IServiceCollection services, } } +#if NET8_0 + [Theory(Skip = "Need to Adjust with .Net 8, https://github.com/AzureAD/microsoft-identity-web/issues/2310")] + [InlineData(true)] + [InlineData(false)] +#else [Theory] [InlineData(true)] [InlineData(false)] +#endif + + public void AddMicrosoftIdentityWebApi_WithConfigName_SubscribesToDiagnostics(bool subscribeToDiagnostics) { var config = Substitute.For(); @@ -177,9 +196,15 @@ public void AddMicrosoftIdentityWebApi_WithConfigName_SubscribesToDiagnostics(bo } } +#if NET8_0 + [Theory(Skip = "Need to Adjust with .Net 8, https://github.com/AzureAD/microsoft-identity-web/issues/2310")] + [InlineData(true)] + [InlineData(false)] +#else [Theory] [InlineData(true)] [InlineData(false)] +#endif public void AddMicrosoftIdentityWebApi_WithConfigActions_SubscribesToDiagnostics(bool subscribeToDiagnostics) { var diagnostics = Substitute.For(); @@ -233,7 +258,11 @@ private IConfigurationSection GetConfigSection(string configSectionName) return configSection; } +#if NET8_0 + [Fact(Skip = "Need to Adjust with .Net 8, see https://github.com/AzureAD/microsoft-identity-web/issues/2310")] +#else [Fact] +#endif public async Task AddMicrosoftIdentityWebApiCallsWebApi_WithConfigName() { var configMock = Substitute.For(); @@ -266,7 +295,11 @@ public async Task AddMicrosoftIdentityWebApiCallsWebApi_WithConfigName() await AddMicrosoftIdentityWebApiCallsWebApi_TestCommon(services, provider, tokenValidatedFuncMock).ConfigureAwait(false); } +#if NET8_0 + [Fact(Skip = "Need to Adjust with .Net 8, see https://github.com/AzureAD/microsoft-identity-web/issues/2310")] +#else [Fact] +#endif public async Task AddMicrosoftIdentityWebApiCallsWebApi_WithConfigActions() { var tokenValidatedFuncMock = Substitute.For>(); diff --git a/tests/Microsoft.Identity.Web.Test/WebAppExtensionsTests.cs b/tests/Microsoft.Identity.Web.Test/WebAppExtensionsTests.cs index 2fda58aa5..fd0cae1c8 100644 --- a/tests/Microsoft.Identity.Web.Test/WebAppExtensionsTests.cs +++ b/tests/Microsoft.Identity.Web.Test/WebAppExtensionsTests.cs @@ -874,13 +874,16 @@ private IConfigurationSection GetConfigSection(string configSectionName, bool in public void PreventChangesInOpenIdConnectOptionsToBeOverlooked() { // If the number of public properties of OpenIdConnectOptions changes, - // then, the PopulateOpenIdOptionsFromMicrosoftIdentityOptions method + // then, the PopulateOpenIdOptionsFromMergedOptions method // needs to be updated. For this uncomment the 2 lines below, and run the test // then diff the files to find what are the new properties int numberOfProperties = typeof(OpenIdConnectOptions).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance).Length; - +#if NET8_0_OR_GREATER + int expectedNumberOfProperties = 58; +#else int expectedNumberOfProperties = 57; - // System.IO.File.WriteAllLines(@"c:\temp\net5.txt", typeof(OpenIdConnectOptions).GetProperties().Select(p => p.Name)); +#endif + //System.IO.File.WriteAllLines(@"C:\temp\net8.txt", typeof(OpenIdConnectOptions).GetProperties().Select(p => p.Name)); Assert.Equal(expectedNumberOfProperties, numberOfProperties); } } diff --git a/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Benchmark/Microsoft.Identity.Web.Perf.Benchmark.csproj b/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Benchmark/Microsoft.Identity.Web.Perf.Benchmark.csproj index f7b8f951f..f3c3b4ecd 100644 --- a/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Benchmark/Microsoft.Identity.Web.Perf.Benchmark.csproj +++ b/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Benchmark/Microsoft.Identity.Web.Perf.Benchmark.csproj @@ -2,7 +2,8 @@ Exe - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 ..\..\..\.sonarlint\azuread_microsoft-identity-webcsharp.ruleset ../../../build/MSAL.snk diff --git a/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Client/Microsoft.Identity.Web.Perf.Client.csproj b/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Client/Microsoft.Identity.Web.Perf.Client.csproj index ee38f5e1b..42788682c 100644 --- a/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Client/Microsoft.Identity.Web.Perf.Client.csproj +++ b/tests/PerformanceTests/Microsoft.Identity.Web.Perf.Client/Microsoft.Identity.Web.Perf.Client.csproj @@ -2,7 +2,8 @@ Exe - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 ..\..\..\.sonarlint\azuread_microsoft-identity-webcsharp.ruleset ../../../build/MSAL.snk disable diff --git a/tests/PerformanceTests/PerformanceTestService/PerformanceTestService.csproj b/tests/PerformanceTests/PerformanceTestService/PerformanceTestService.csproj index 1f44dca86..5f4ee9dbe 100644 --- a/tests/PerformanceTests/PerformanceTestService/PerformanceTestService.csproj +++ b/tests/PerformanceTests/PerformanceTestService/PerformanceTestService.csproj @@ -1,7 +1,8 @@  - net6.0; net7.0 + net6.0; net7.0; net8.0 + net6.0; net7.0 false true ../../../build/MSAL.snk diff --git a/tools/app-provisioning-tool/app-provisioning-lib/app-provisioning-lib.csproj b/tools/app-provisioning-tool/app-provisioning-lib/app-provisioning-lib.csproj index 7b1752ee7..9cbb723ef 100644 --- a/tools/app-provisioning-tool/app-provisioning-lib/app-provisioning-lib.csproj +++ b/tools/app-provisioning-tool/app-provisioning-lib/app-provisioning-lib.csproj @@ -44,7 +44,7 @@ - +