From b2432eae8dc9e7004388774449873fd967397deb Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Fri, 8 Nov 2024 16:44:36 -0800
Subject: [PATCH 1/9] Update to .NET 9 GA. Update some test dependencies.
---
.github/workflows/dotnetcore.yml | 15 ++++++++-------
.../Microsoft.IdentityModel.Benchmarks.csproj | 3 +--
build/common.props | 2 +-
build/dependenciesTest.props | 8 ++++----
build/targets.props | 5 ++---
build/targetsTest.props | 5 ++---
build/template-Build-run-tests-sign.yml | 11 +++++------
....IdentityModel.AotCompatibility.TestApp.csproj | 3 +--
...ft.IdentityModel.AotCompatibility.Tests.csproj | 3 +--
9 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 5f6b376481..f71bba36cd 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -18,7 +18,6 @@ on:
- dev
env:
- TargetNet9: True
TargetNet8: True
jobs:
@@ -30,18 +29,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- - name: Setup .NET 6.0.x
+ - name: Setup .NET 6.x
uses: actions/setup-dotnet@v4.0.0
with:
- dotnet-version: 6.0.x
- - name: Setup .NET 8.0.x
+ dotnet-version: 6.x
+
+ - name: Setup .NET 8.x
uses: actions/setup-dotnet@v4.0.0
with:
- dotnet-version: 8.0.x
- - name: Setup .NET 9.0.x
+ dotnet-version: 8.x
+
+ - name: Setup .NET 9.x
uses: actions/setup-dotnet@v4.0.0
with:
- dotnet-version: 9.0.100-rc.2.24474.11
+ dotnet-version: 9.x
- name: Run the tests
run: dotnet test Wilson.sln --collect:"XPlat Code Coverage" --settings:./build/CodeCoverage.runsettings
diff --git a/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj b/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
index ac1a985f5e..0945e2dfe2 100644
--- a/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
+++ b/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
@@ -4,8 +4,7 @@
Microsoft.IdentityModel.Benchmarks
Microsoft.IdentityModel.Benchmarks
Exe
- net6.0;net8.0
- $(TargetFrameworks); net9.0
+ net6.0;net8.0;net9.0
True
True
$(MSBuildThisFileDirectory)..\..\build\35MSSharedLib1024.snk
diff --git a/build/common.props b/build/common.props
index b80be3698f..41be4bdb83 100644
--- a/build/common.props
+++ b/build/common.props
@@ -48,7 +48,7 @@
-
+
diff --git a/build/dependenciesTest.props b/build/dependenciesTest.props
index 0cdd52d56f..65daedcf38 100644
--- a/build/dependenciesTest.props
+++ b/build/dependenciesTest.props
@@ -4,19 +4,19 @@
3.3.4
2.1.30
3.0.5
- 17.11.0
+ 17.11.1
2.0.3
13.0.3
4.3.4
4.3.0
8.0.5
4.3.1
- 2.9.0
+ 2.9.2
2.8.2
- 2.9.0
+ 2.9.2
2.3.24
- 3.0.0-pre.35
+ 3.0.0-pre.49
diff --git a/build/targets.props b/build/targets.props
index dc29e3024f..27fe72364b 100644
--- a/build/targets.props
+++ b/build/targets.props
@@ -1,7 +1,6 @@
- net462;net472;netstandard2.0;net6.0;net8.0
- netstandard2.0;net8.0
- $(SrcTargets);net9.0
+ net462;net472;netstandard2.0;net6.0;net8.0;net9.0
+ netstandard2.0;net8.0;net9.0
diff --git a/build/targetsTest.props b/build/targetsTest.props
index 380ab3f7cd..931b0fc522 100644
--- a/build/targetsTest.props
+++ b/build/targetsTest.props
@@ -1,7 +1,6 @@
- net462;net472;net6.0;net8.0
- net8.0
- $(TestTargets);net9.0
+ net462;net472;net6.0;net8.0;net9.0
+ net8.0;net9.0
diff --git a/build/template-Build-run-tests-sign.yml b/build/template-Build-run-tests-sign.yml
index e57c0ec81c..f3bf8787bc 100644
--- a/build/template-Build-run-tests-sign.yml
+++ b/build/template-Build-run-tests-sign.yml
@@ -8,19 +8,19 @@ steps:
displayName: 'display MicrosoftIdentityModelVersion'
- task: UseDotNet@2
- displayName: 'Use .NET Core sdk 2.x'
+ displayName: 'Use .NET Core SDK 2.x'
inputs:
version: 2.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: UseDotNet@2
- displayName: 'Use .NET Core sdk 6.x'
+ displayName: 'Use .NET Core SDK 6.x'
inputs:
version: 6.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: UseDotNet@2
- displayName: 'Use .NET Core sdk 8.x'
+ displayName: 'Use .NET Core SDK 8.x'
inputs:
version: 8.x
installationPath: $(Agent.ToolsDirectory)/dotnet
@@ -28,9 +28,8 @@ steps:
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 9.x'
inputs:
- version: 9.0.100-rc.2.24474.11
- includePreviewVersions: true
- condition: eq(variables['TargetNet9'], 'True')
+ version: 9.x
+ installationPath: $(Agent.ToolsDirectory)/dotnet
- task: DotNetCoreCLI@2
displayName: 'dotnet --list-sdks'
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
index 6e708ec2ac..71d856a99a 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
@@ -1,8 +1,7 @@
- net8.0
- $(TargetFramework); net9.0
+ net8.0;net9.0
Exe
true
full
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
index 07b2b77495..d825ba28dd 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
@@ -4,8 +4,7 @@
- net8.0
- $(TargetFrameworks);net9.0
+ net8.0;net9.0
12
1.0.0-preview
From 0bc49b6c1241e846c0a11f95684dfae4a5ec864b Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Mon, 11 Nov 2024 20:55:33 -0800
Subject: [PATCH 2/9] Remove installing extra SDKs in YAML.
---
.github/workflows/dotnetcore.yml | 10 ----------
build/template-Build-run-tests-sign.yml | 18 ------------------
2 files changed, 28 deletions(-)
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index f71bba36cd..c049627a2a 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -29,16 +29,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- - name: Setup .NET 6.x
- uses: actions/setup-dotnet@v4.0.0
- with:
- dotnet-version: 6.x
-
- - name: Setup .NET 8.x
- uses: actions/setup-dotnet@v4.0.0
- with:
- dotnet-version: 8.x
-
- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4.0.0
with:
diff --git a/build/template-Build-run-tests-sign.yml b/build/template-Build-run-tests-sign.yml
index f3bf8787bc..34660b298b 100644
--- a/build/template-Build-run-tests-sign.yml
+++ b/build/template-Build-run-tests-sign.yml
@@ -7,24 +7,6 @@ steps:
- script: echo $(MicrosoftIdentityModelVersion)
displayName: 'display MicrosoftIdentityModelVersion'
-- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 2.x'
- inputs:
- version: 2.x
- installationPath: $(Agent.ToolsDirectory)/dotnet
-
-- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 6.x'
- inputs:
- version: 6.x
- installationPath: $(Agent.ToolsDirectory)/dotnet
-
-- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 8.x'
- inputs:
- version: 8.x
- installationPath: $(Agent.ToolsDirectory)/dotnet
-
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 9.x'
inputs:
From cd7e0c84445411ec95f067b2f01bba6c823f1e7b Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Mon, 11 Nov 2024 20:56:33 -0800
Subject: [PATCH 3/9] Add TargetNetNext flag.
---
.github/workflows/dotnetcore.yml | 4 ++--
.../Microsoft.IdentityModel.Benchmarks.csproj | 1 +
build/targets.props | 5 +++--
build/targetsTest.props | 7 ++++---
build/template-Build-run-tests-sign.yml | 2 +-
...Microsoft.IdentityModel.AotCompatibility.TestApp.csproj | 3 ++-
.../Microsoft.IdentityModel.AotCompatibility.Tests.csproj | 3 ++-
7 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index c049627a2a..6871bcbabe 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -18,7 +18,7 @@ on:
- dev
env:
- TargetNet8: True
+ TargetNetNext: True
jobs:
build:
@@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
-
+
- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4.0.0
with:
diff --git a/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj b/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
index 0945e2dfe2..db8f7b2621 100644
--- a/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
+++ b/benchmark/Microsoft.IdentityModel.Benchmarks/Microsoft.IdentityModel.Benchmarks.csproj
@@ -5,6 +5,7 @@
Microsoft.IdentityModel.Benchmarks
Exe
net6.0;net8.0;net9.0
+ $(TargetFrameworks);
True
True
$(MSBuildThisFileDirectory)..\..\build\35MSSharedLib1024.snk
diff --git a/build/targets.props b/build/targets.props
index 27fe72364b..f66cb73e52 100644
--- a/build/targets.props
+++ b/build/targets.props
@@ -1,6 +1,7 @@
- net462;net472;netstandard2.0;net6.0;net8.0;net9.0
- netstandard2.0;net8.0;net9.0
+ net462; net472; netstandard2.0; net6.0; net8.0; net9.0
+ netstandard2.0; net8.0; net9.0
+ $(SrcTargets);
diff --git a/build/targetsTest.props b/build/targetsTest.props
index 931b0fc522..98ff6900e8 100644
--- a/build/targetsTest.props
+++ b/build/targetsTest.props
@@ -1,6 +1,7 @@
- net462;net472;net6.0;net8.0;net9.0
- net8.0;net9.0
-
+ net462; net472; net6.0; net8.0; net9.0
+ net8.0; net9.0
+ $(TestTargets);
+
diff --git a/build/template-Build-run-tests-sign.yml b/build/template-Build-run-tests-sign.yml
index 34660b298b..6aec999d48 100644
--- a/build/template-Build-run-tests-sign.yml
+++ b/build/template-Build-run-tests-sign.yml
@@ -95,7 +95,7 @@ steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@2
displayName: 'Run Roslyn Analyzers'
- condition: and(eq(variables['TargetNet8'], 'False'), eq(variables['PipelineType'], 'legacy'))
+ condition: and(succeeded(), eq(variables['PipelineType'], 'legacy'))
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
displayName: 'Run BinSkim'
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
index 71d856a99a..a2d20b10cc 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
@@ -1,7 +1,8 @@
- net8.0;net9.0
+ net8.0; net9.0
+ $(TargetFrameworks);
Exe
true
full
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
index d825ba28dd..152d4d91b4 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
@@ -4,7 +4,8 @@
- net8.0;net9.0
+ net8.0; net9.0
+ $(TargetFrameworks);
12
1.0.0-preview
From f1f5397a1a69b86f380bf7501de71101ce193a66 Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Mon, 11 Nov 2024 21:03:57 -0800
Subject: [PATCH 4/9] Update template-Build-run-tests-sign.yml
---
build/template-Build-run-tests-sign.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/template-Build-run-tests-sign.yml b/build/template-Build-run-tests-sign.yml
index 6aec999d48..34660b298b 100644
--- a/build/template-Build-run-tests-sign.yml
+++ b/build/template-Build-run-tests-sign.yml
@@ -95,7 +95,7 @@ steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@2
displayName: 'Run Roslyn Analyzers'
- condition: and(succeeded(), eq(variables['PipelineType'], 'legacy'))
+ condition: and(eq(variables['TargetNet8'], 'False'), eq(variables['PipelineType'], 'legacy'))
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
displayName: 'Run BinSkim'
From f23507c9ff26ee99259ced278b41b0fefc8211b1 Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Wed, 13 Nov 2024 09:54:15 -0800
Subject: [PATCH 5/9] Nit.
---
build/targets.props | 6 +++---
build/targetsTest.props | 6 +++---
.../Microsoft.IdentityModel.AotCompatibility.TestApp.csproj | 4 ++--
.../Microsoft.IdentityModel.AotCompatibility.Tests.csproj | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/build/targets.props b/build/targets.props
index f66cb73e52..7706821787 100644
--- a/build/targets.props
+++ b/build/targets.props
@@ -1,7 +1,7 @@
- net462; net472; netstandard2.0; net6.0; net8.0; net9.0
- netstandard2.0; net8.0; net9.0
- $(SrcTargets);
+ net462;net472;netstandard2.0;net6.0;net8.0;net9.0
+ netstandard2.0;net8.0;net9.0
+ $(SrcTargets);
diff --git a/build/targetsTest.props b/build/targetsTest.props
index 98ff6900e8..3ce14d058e 100644
--- a/build/targetsTest.props
+++ b/build/targetsTest.props
@@ -1,7 +1,7 @@
- net462; net472; net6.0; net8.0; net9.0
- net8.0; net9.0
- $(TestTargets);
+ net462;net472;net6.0;net8.0;net9.0
+ net8.0;net9.0
+ $(TestTargets);
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
index a2d20b10cc..2ffe0e3b28 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
@@ -1,8 +1,8 @@
- net8.0; net9.0
- $(TargetFrameworks);
+ net8.0;net9.0
+ $(TargetFrameworks);
Exe
true
full
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
index 152d4d91b4..c72cdd01e8 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/Microsoft.IdentityModel.AotCompatibility.Tests.csproj
@@ -4,8 +4,8 @@
- net8.0; net9.0
- $(TargetFrameworks);
+ net8.0;net9.0
+ $(TargetFrameworks);
12
1.0.0-preview
From 1a9f885dd8fd7bdcfc9cd27064884e5254abb81b Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Wed, 13 Nov 2024 11:19:54 -0800
Subject: [PATCH 6/9] Update aot-check.yml
---
.github/workflows/aot-check.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/aot-check.yml b/.github/workflows/aot-check.yml
index b9f684dca1..36e508ccd3 100644
--- a/.github/workflows/aot-check.yml
+++ b/.github/workflows/aot-check.yml
@@ -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'
From a226e09093a3feb318c2c03bb4d4a810ea852c33 Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Thu, 14 Nov 2024 01:14:51 -0800
Subject: [PATCH 7/9] Update yaml.
---
.github/workflows/aot-check.yml | 4 ++--
.github/workflows/dotnetcore.yml | 16 ++++++++--------
build/test-aot.ps1 | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/aot-check.yml b/.github/workflows/aot-check.yml
index 36e508ccd3..911da7f712 100644
--- a/.github/workflows/aot-check.yml
+++ b/.github/workflows/aot-check.yml
@@ -14,7 +14,7 @@ on:
jobs:
analyze:
runs-on: windows-latest
- name: Wilson GitHub AOT check
+ name: "AOT check"
steps:
- name: Checkout repository
@@ -23,7 +23,7 @@ jobs:
fetch-depth: 1
- name: Setup .NET 9.0.x
- uses: actions/setup-dotnet@v4.0.1
+ uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: 9.0.x
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 6871bcbabe..ecb50c2db9 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -1,4 +1,4 @@
-name: .NET Core
+name: "Run unit tests"
permissions:
contents: read
@@ -23,14 +23,14 @@ env:
jobs:
build:
runs-on: windows-latest
- continue-on-error: true
- name: Wilson GitHub Action Test
+ continue-on-error: false
+ name: "Build and run unit tests"
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- name: Setup .NET 9.x
- uses: actions/setup-dotnet@v4.0.0
+ uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: 9.x
@@ -39,10 +39,10 @@ jobs:
- name: Create code coverage report
run: |
- dotnet tool install -g dotnet-reportgenerator-globaltool
+ dotnet tool install -g dotnet-reportgenerator-globaltool --version 5.4.1
reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:CodeCoverage -reporttypes:'MarkdownSummaryGithub;Cobertura'
- - name: Write Coverage to Job Summary
+ - name: Write coverage to job summary
shell: bash
run: |
cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
@@ -50,7 +50,7 @@ jobs:
echo $(cat CodeCoverage/SummaryGithub.md) >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- - name: Comment Coverage in PR
+ - name: Comment coverage in PR
uses: actions/github-script@v7
id: comment
with:
@@ -64,4 +64,4 @@ jobs:
# Run baseline package validation
- name: Pack
- run: dotnet pack Product.proj --no-restore --no-build
\ No newline at end of file
+ run: dotnet pack Product.proj --no-restore --no-build
diff --git a/build/test-aot.ps1 b/build/test-aot.ps1
index 9d2188e938..7afda6f861 100644
--- a/build/test-aot.ps1
+++ b/build/test-aot.ps1
@@ -2,7 +2,7 @@ param([string]$targetNetFramework)
$projectName='Microsoft.IdentityModel.AotCompatibility.TestApp'
$rootDirectory = Split-Path $PSScriptRoot -Parent
-$publishOutput = dotnet publish $rootDirectory/test/$projectName/$projectName.csproj --self-contained -nodeReuse:false /p:UseSharedCompilation=false
+$publishOutput = dotnet publish $rootDirectory/test/$projectName/$projectName.csproj --self-contained --framework $targetNetFramework -nodeReuse:false /p:UseSharedCompilation=false
$actualWarningCount = 0
From 6a16ad6a32db42706f60e47527e656f3c748d117 Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Thu, 14 Nov 2024 01:42:38 -0800
Subject: [PATCH 8/9] Fix AOT test.
---
.../AotCompatibilityTests.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs
index b00cd4bc9f..1c5af61ae1 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs
+++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs
@@ -38,6 +38,12 @@ public void EnsureAotCompatibility()
string testAppPath = Path.Combine("..", "..", "..", "..", "Microsoft.IdentityModel.AotCompatibility.TestApp");
string testAppProject = "Microsoft.IdentityModel.AotCompatibility.TestApp.csproj";
+#if NET9_0_OR_GREATER
+ string framework = "net9.0";
+#else
+ string framework = "net8.0";
+#endif
+
// ensure we run a clean publish every time
DirectoryInfo testObjDir = new DirectoryInfo(Path.Combine(testAppPath, "obj"));
if (testObjDir.Exists)
@@ -47,7 +53,7 @@ public void EnsureAotCompatibility()
var process = new Process();
// set '-nodereuse:false /p:UseSharedCompilation=false' so the MSBuild and Roslyn server processes don't hang around, which may hang the test in CI
- process.StartInfo = new ProcessStartInfo("dotnet", $"publish {testAppProject} --self-contained -nodereuse:false /p:UseSharedCompilation=false")
+ process.StartInfo = new ProcessStartInfo("dotnet", $"publish {testAppProject} --self-contained --framework {framework} -nodereuse:false /p:UseSharedCompilation=false")
{
RedirectStandardOutput = true,
UseShellExecute = false,
From d462a44055f866e845dfc16c57ed0903bdf29949 Mon Sep 17 00:00:00 2001
From: Peter <34331512+pmaytak@users.noreply.github.com>
Date: Thu, 14 Nov 2024 01:59:45 -0800
Subject: [PATCH 9/9] Add strong name bypass
---
.github/workflows/dotnetcore.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index ecb50c2db9..cfef45dc72 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -34,6 +34,10 @@ jobs:
with:
dotnet-version: 9.x
+ - name: Strong name bypass
+ run: |
+ regedit /s .\build\strongNameBypass.reg
+
- name: Run the tests
run: dotnet test Wilson.sln --collect:"XPlat Code Coverage" --settings:./build/CodeCoverage.runsettings