From 2fa38eb14e93c2edeabc7e83ac5cd2393778a575 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 16 May 2024 16:16:29 +0100 Subject: [PATCH 01/11] Add script to perform AOT check --- .github/workflows/aot-check.yml | 32 ++++++++++ Microsoft.Identity.Web.sln | 9 ++- build/test-aot.ps1 | 58 +++++++++++++++++++ ...dentity.Web.AotCompatibiliy.TestApp.csproj | 33 +++++++++++ .../Program.cs | 12 ++++ 5 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/aot-check.yml create mode 100644 build/test-aot.ps1 create mode 100644 tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj create mode 100644 tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs diff --git a/.github/workflows/aot-check.yml b/.github/workflows/aot-check.yml new file mode 100644 index 000000000..6c566e285 --- /dev/null +++ b/.github/workflows/aot-check.yml @@ -0,0 +1,32 @@ +name: "AOT Check" + +on: + push: + branches: [ "dev", "dev6x" ] + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + branches: [ "dev", "dev6x" ] + +jobs: + analyze: + runs-on: windows-latest + name: Wilson GitHub AOT check + + strategy: + matrix: + language: [ 'csharp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Runs powershell script + id: aot-powershell + run: build\test-aot.ps1 + diff --git a/Microsoft.Identity.Web.sln b/Microsoft.Identity.Web.sln index 3297c7fbc..fd1a04636 100644 --- a/Microsoft.Identity.Web.sln +++ b/Microsoft.Identity.Web.sln @@ -169,7 +169,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "benchmark\Ben EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContosoWorker", "tests\DevApps\ContosoWorker\ContosoWorker.csproj", "{4A63EA63-5679-4498-BB4C-30E09F268E00}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Identity.Web.UI", "src\Microsoft.Identity.Web.UI\Microsoft.Identity.Web.UI.csproj", "{C6CB0D5B-917A-4127-9984-7592C757BBDE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.UI", "src\Microsoft.Identity.Web.UI\Microsoft.Identity.Web.UI.csproj", "{C6CB0D5B-917A-4127-9984-7592C757BBDE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.AotCompatibiliy.TestApp", "tests\Microsoft.Identity.Web.AotCompatibiliy.TestApp\Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj", "{BCE63265-6D36-423A-9C3D-BF8E448C7EA0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -401,6 +403,10 @@ Global {C6CB0D5B-917A-4127-9984-7592C757BBDE}.Debug|Any CPU.Build.0 = Debug|Any CPU {C6CB0D5B-917A-4127-9984-7592C757BBDE}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6CB0D5B-917A-4127-9984-7592C757BBDE}.Release|Any CPU.Build.0 = Release|Any CPU + {BCE63265-6D36-423A-9C3D-BF8E448C7EA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BCE63265-6D36-423A-9C3D-BF8E448C7EA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BCE63265-6D36-423A-9C3D-BF8E448C7EA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BCE63265-6D36-423A-9C3D-BF8E448C7EA0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -480,6 +486,7 @@ Global {8FB5433F-D625-464E-8957-FDD0AC20FBDE} = {A6799B45-E2FD-4ACA-86A2-D1AD5B1E2ECE} {4A63EA63-5679-4498-BB4C-30E09F268E00} = {E37CDBC1-18F6-4C06-A3EE-532C9106721F} {C6CB0D5B-917A-4127-9984-7592C757BBDE} = {1DDE1AAC-5AE6-4725-94B6-A26C58D3423F} + {BCE63265-6D36-423A-9C3D-BF8E448C7EA0} = {B4E72F1C-603F-437C-AAA1-153A604CD34A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {104367F1-CE75-4F40-B32F-F14853973187} diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 new file mode 100644 index 000000000..6c383b7fd --- /dev/null +++ b/build/test-aot.ps1 @@ -0,0 +1,58 @@ +$targetNetFramework='net8.0' +#param([string]$targetNetFramework) + +$projectName='Microsoft.Identity.Web.AotCompatibiliy.TestApp' +$rootDirectory = Split-Path $PSScriptRoot -Parent +$publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj --self-contained -nodeReuse:false /p:UseSharedCompilation=false + +$actualWarningCount = 0 + +foreach ($line in $($publishOutput -split "`r`n")) +{ + if (($line -like "*analysis warning IL*") -or ($line -like "*analysis error IL*")) + { + Write-Host $line + $actualWarningCount += 1 + } +} + +Write-Host "Actual warning count is: ", $actualWarningCount +$expectedWarningCount = 0 + +if ($LastExitCode -ne 0) +{ + Write-Host "There was an error while publishing AotCompatibility Test App. LastExitCode is:", $LastExitCode + Write-Host $publishOutput +} + +#$runtime = if ($IsWindows) { "win-x64" } elseif ($IsMacOS) { "macos-x64"} else {"linux-x64"} +$app = './$projectName.exe' +#if ($IsWindows ) {"./Microsoft.IdentityModel.AotCompatibility.TestApp.exe" } else {"./Microsoft.IdentityModel.AotCompatibility.TestApp" } + +Push-Location $rootDirectory/tests/$projectName/bin/Release/$targetNetFramework/win-x64 + +Write-Host "Executing test App..." +$app +Write-Host "Finished executing test App" + +if ($LastExitCode -ne 0) +{ + Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode +} + +Pop-Location + +$testPassed = 0 +if ($actualWarningCount -ne $expectedWarningCount) +{ + $testPassed = 1 + Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount +} + +Exit $testPassed + + + + + + diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj new file mode 100644 index 000000000..1cf48e4c0 --- /dev/null +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj @@ -0,0 +1,33 @@ + + + + net8.0 + $(TargetFramework); net9.0 + Exe + true + full + false + false + net8.0; + + + + + + + + + + + + + + + + + diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs new file mode 100644 index 000000000..a0e39d83b --- /dev/null +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + + +internal sealed class Program +{ + // The code in this program is expected to be trim and AOT compatible + private static int Main() + { + return 100; + } +} From 729d4be8c53b03644437586dabdd8fa473c0d4bd Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 16 May 2024 16:55:44 +0100 Subject: [PATCH 02/11] Fix branch name --- .github/workflows/aot-check.yml | 10 ++++++---- build/test-aot.ps1 | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/aot-check.yml b/.github/workflows/aot-check.yml index 6c566e285..77a72f76b 100644 --- a/.github/workflows/aot-check.yml +++ b/.github/workflows/aot-check.yml @@ -2,19 +2,21 @@ name: "AOT Check" on: push: - branches: [ "dev", "dev6x" ] + branches: + - master pull_request: types: - opened - synchronize - reopened - ready_for_review - branches: [ "dev", "dev6x" ] + branches: + - master jobs: analyze: runs-on: windows-latest - name: Wilson GitHub AOT check + name: AOT check strategy: matrix: @@ -28,5 +30,5 @@ jobs: - name: Runs powershell script id: aot-powershell - run: build\test-aot.ps1 + run: build\test-aot.ps1 'net8.0' diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 6c383b7fd..18c858d70 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -1,5 +1,4 @@ -$targetNetFramework='net8.0' -#param([string]$targetNetFramework) +param([string]$targetNetFramework) $projectName='Microsoft.Identity.Web.AotCompatibiliy.TestApp' $rootDirectory = Split-Path $PSScriptRoot -Parent From e54cf5592cd6f387f73b9795d7a343f560457578 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 16 May 2024 23:34:42 +0100 Subject: [PATCH 03/11] Cleanup yml file --- .github/workflows/aot-check.yml | 12 +++--------- build/test-aot.ps1 | 5 ++--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/aot-check.yml b/.github/workflows/aot-check.yml index 77a72f76b..07799d360 100644 --- a/.github/workflows/aot-check.yml +++ b/.github/workflows/aot-check.yml @@ -2,31 +2,25 @@ name: "AOT Check" on: push: - branches: - - master + branches: [ "master", "rel/v2" ] pull_request: types: - opened - synchronize - reopened - ready_for_review - branches: - - master + branches: [ "master", "rel/v2" ] jobs: analyze: runs-on: windows-latest name: AOT check - strategy: - matrix: - language: [ 'csharp' ] - steps: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 2 + fetch-depth: 1 - name: Runs powershell script id: aot-powershell diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 18c858d70..533bd7bb6 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -24,9 +24,8 @@ if ($LastExitCode -ne 0) Write-Host $publishOutput } -#$runtime = if ($IsWindows) { "win-x64" } elseif ($IsMacOS) { "macos-x64"} else {"linux-x64"} -$app = './$projectName.exe' -#if ($IsWindows ) {"./Microsoft.IdentityModel.AotCompatibility.TestApp.exe" } else {"./Microsoft.IdentityModel.AotCompatibility.TestApp" } +$runtime = if ($IsWindows) { "win-x64" } elseif ($IsMacOS) { "macos-x64"} else {"linux-x64"} +$app = if ($IsWindows ) {"./$projectName.exe" } else {"./$projectName" } Push-Location $rootDirectory/tests/$projectName/bin/Release/$targetNetFramework/win-x64 From 962eab09f0d6f2eb5aba8624a085449f47e8b6b4 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 16 May 2024 23:36:07 +0100 Subject: [PATCH 04/11] Remove empty lines --- build/test-aot.ps1 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 533bd7bb6..8a0a43f77 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -48,9 +48,3 @@ if ($actualWarningCount -ne $expectedWarningCount) } Exit $testPassed - - - - - - From e86d3b3d5d3a274db438622c39e0e88f5d0805da Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Tue, 21 May 2024 13:33:31 +0100 Subject: [PATCH 05/11] Code review comments --- build/test-aot.ps1 | 4 ++-- ...crosoft.Identity.Web.AotCompatibiliy.TestApp.csproj | 10 ++++------ .../Program.cs | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 8a0a43f77..9815db05a 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -2,7 +2,7 @@ param([string]$targetNetFramework) $projectName='Microsoft.Identity.Web.AotCompatibiliy.TestApp' $rootDirectory = Split-Path $PSScriptRoot -Parent -$publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj --self-contained -nodeReuse:false /p:UseSharedCompilation=false +$publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj -nodeReuse:false /p:UseSharedCompilation=false --framework 'net8.0' $actualWarningCount = 0 @@ -44,7 +44,7 @@ $testPassed = 0 if ($actualWarningCount -ne $expectedWarningCount) { $testPassed = 1 - Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount + Write-Host "Actual warning count:", $actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount } Exit $testPassed diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj index 1cf48e4c0..284c97891 100644 --- a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj @@ -1,14 +1,12 @@  - net8.0 - $(TargetFramework); net9.0 + net8.0; Exe - true - full - false + true + false + true false - net8.0; diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs index a0e39d83b..eadd92b4e 100644 --- a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - internal sealed class Program { // The code in this program is expected to be trim and AOT compatible From f19cdfbc1f4b3e5cda7b127c8739f1d348767c46 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Tue, 21 May 2024 14:07:24 +0100 Subject: [PATCH 06/11] Fix variable name --- build/test-aot.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 9815db05a..a2d55fdd6 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -2,7 +2,7 @@ param([string]$targetNetFramework) $projectName='Microsoft.Identity.Web.AotCompatibiliy.TestApp' $rootDirectory = Split-Path $PSScriptRoot -Parent -$publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj -nodeReuse:false /p:UseSharedCompilation=false --framework 'net8.0' +$publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj --framework $targetNetFramework -nodeReuse:false /p:UseSharedCompilation=false $actualWarningCount = 0 From e1e23bfb94424270ecbf359832d4b86cdd406426 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Tue, 21 May 2024 15:44:38 +0100 Subject: [PATCH 07/11] Change error level to warning --- .../Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj index 284c97891..3db6f70b4 100644 --- a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj @@ -5,7 +5,7 @@ Exe true false - true + false false From 047333d73a013746b2e3664a480948e0bba293fa Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Tue, 21 May 2024 17:51:45 +0100 Subject: [PATCH 08/11] Set expected warning count --- build/test-aot.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index a2d55fdd6..85f72c077 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -16,7 +16,7 @@ foreach ($line in $($publishOutput -split "`r`n")) } Write-Host "Actual warning count is: ", $actualWarningCount -$expectedWarningCount = 0 +$expectedWarningCount = 41 if ($LastExitCode -ne 0) { @@ -41,7 +41,7 @@ if ($LastExitCode -ne 0) Pop-Location $testPassed = 0 -if ($actualWarningCount -ne $expectedWarningCount) +if ($expectedWarningCount -lt $actualWarningCount) { $testPassed = 1 Write-Host "Actual warning count:", $actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount From c7763417a84f097426586ad36af217151d6b4e5a Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Wed, 22 May 2024 16:21:11 +0100 Subject: [PATCH 09/11] Update project file --- build/test-aot.ps1 | 4 +-- ...dentity.Web.AotCompatibiliy.TestApp.csproj | 28 +++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 85f72c077..6cdd83cac 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -16,7 +16,7 @@ foreach ($line in $($publishOutput -split "`r`n")) } Write-Host "Actual warning count is: ", $actualWarningCount -$expectedWarningCount = 41 +$expectedWarningCount = 63 if ($LastExitCode -ne 0) { @@ -41,7 +41,7 @@ if ($LastExitCode -ne 0) Pop-Location $testPassed = 0 -if ($expectedWarningCount -lt $actualWarningCount) +if ($expectedWarningCount -ne $actualWarningCount) { $testPassed = 1 Write-Host "Actual warning count:", $actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj index 3db6f70b4..b743b7173 100644 --- a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj +++ b/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj @@ -16,16 +16,28 @@ Other referenced assemblies will only have code referenced from Program.cs analyzed. --> - - - + + + + + + + + + + - - - - + - + + + + + + From 6a147bca8f549a02a52e05257516a6dc59a341c7 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Wed, 22 May 2024 17:21:18 +0100 Subject: [PATCH 10/11] Fix folder name --- Microsoft.Identity.Web.sln | 2 +- build/test-aot.ps1 | 2 +- .../Microsoft.Identity.Web.AotCompatibility.TestApp.csproj} | 0 .../Program.cs | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename tests/{Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj => Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj} (100%) rename tests/{Microsoft.Identity.Web.AotCompatibiliy.TestApp => Microsoft.Identity.Web.AotCompatibility.TestApp}/Program.cs (100%) diff --git a/Microsoft.Identity.Web.sln b/Microsoft.Identity.Web.sln index fd1a04636..cbb4c2f30 100644 --- a/Microsoft.Identity.Web.sln +++ b/Microsoft.Identity.Web.sln @@ -171,7 +171,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContosoWorker", "tests\DevA EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.UI", "src\Microsoft.Identity.Web.UI\Microsoft.Identity.Web.UI.csproj", "{C6CB0D5B-917A-4127-9984-7592C757BBDE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.AotCompatibiliy.TestApp", "tests\Microsoft.Identity.Web.AotCompatibiliy.TestApp\Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj", "{BCE63265-6D36-423A-9C3D-BF8E448C7EA0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.AotCompatibility.TestApp", "tests\Microsoft.Identity.Web.AotCompatibility.TestApp\Microsoft.Identity.Web.AotCompatibility.TestApp.csproj", "{BCE63265-6D36-423A-9C3D-BF8E448C7EA0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 6cdd83cac..928f50205 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -1,6 +1,6 @@ param([string]$targetNetFramework) -$projectName='Microsoft.Identity.Web.AotCompatibiliy.TestApp' +$projectName='Microsoft.Identity.Web.AotCompatibility.TestApp' $rootDirectory = Split-Path $PSScriptRoot -Parent $publishOutput = dotnet publish $rootDirectory/tests/$projectName/$projectName.csproj --framework $targetNetFramework -nodeReuse:false /p:UseSharedCompilation=false diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj similarity index 100% rename from tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Microsoft.Identity.Web.AotCompatibiliy.TestApp.csproj rename to tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj diff --git a/tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs b/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Program.cs similarity index 100% rename from tests/Microsoft.Identity.Web.AotCompatibiliy.TestApp/Program.cs rename to tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Program.cs From 48c2fb56dfda1d4f696ed078782a85317131614e Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Wed, 22 May 2024 22:54:21 +0100 Subject: [PATCH 11/11] More feedback --- build/test-aot.ps1 | 2 +- ...rosoft.Identity.Web.AotCompatibility.TestApp.csproj | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build/test-aot.ps1 b/build/test-aot.ps1 index 928f50205..13734d2d2 100644 --- a/build/test-aot.ps1 +++ b/build/test-aot.ps1 @@ -27,7 +27,7 @@ if ($LastExitCode -ne 0) $runtime = if ($IsWindows) { "win-x64" } elseif ($IsMacOS) { "macos-x64"} else {"linux-x64"} $app = if ($IsWindows ) {"./$projectName.exe" } else {"./$projectName" } -Push-Location $rootDirectory/tests/$projectName/bin/Release/$targetNetFramework/win-x64 +Push-Location $rootDirectory/tests/$projectName/bin/Release/$targetNetFramework/$runtime Write-Host "Executing test App..." $app diff --git a/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj b/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj index b743b7173..d35fa212d 100644 --- a/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj +++ b/tests/Microsoft.Identity.Web.AotCompatibility.TestApp/Microsoft.Identity.Web.AotCompatibility.TestApp.csproj @@ -1,23 +1,17 @@  - net8.0; + net8.0 Exe true + true false false false - - -