diff --git a/.github/workflows/verifyaotcompat.yml b/.github/workflows/verifyaotcompat.yml
index c437c70c9c..1a6cc014c7 100644
--- a/.github/workflows/verifyaotcompat.yml
+++ b/.github/workflows/verifyaotcompat.yml
@@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
- os: [ ubuntu-latest ]
+ os: [ ubuntu-latest, windows-latest ]
version: [ net8.0 ]
runs-on: ${{ matrix.os }}
@@ -19,4 +19,3 @@ jobs:
- name: publish AOT testApp, assert static analysis warning count, and run the app
shell: pwsh
run: .\build\test-aot-compatibility.ps1 ${{ matrix.version }}
-
diff --git a/build/test-aot-compatibility.ps1 b/build/test-aot-compatibility.ps1
index ff400b667b..5abe054bec 100644
--- a/build/test-aot-compatibility.ps1
+++ b/build/test-aot-compatibility.ps1
@@ -7,7 +7,7 @@ $actualWarningCount = 0
foreach ($line in $($publishOutput -split "`r`n"))
{
- if ($line -like "*analysis warning IL*")
+ if (($line -like "*analysis warning IL*") -or ($line -like "*analysis error IL*"))
{
Write-Host $line
$actualWarningCount += 1
@@ -17,10 +17,19 @@ foreach ($line in $($publishOutput -split "`r`n"))
Write-Host "Actual warning count is:", $actualWarningCount
$expectedWarningCount = 0
-pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Release/$targetNetFramework/linux-x64
+if ($LastExitCode -ne 0)
+{
+ Write-Host "There was an error while publishing AotCompatibility Test App. LastExitCode is:", $LastExitCode
+ Write-Host $publishOutput
+}
+
+$runtime = $IsWindows ? "win-x64" : ($IsMacOS ? "macos-x64" : "linux-x64")
+$app = $IsWindows ? "./OpenTelemetry.AotCompatibility.TestApp.exe" : "./OpenTelemetry.AotCompatibility.TestApp"
+
+Push-Location $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Release/$targetNetFramework/$runtime
Write-Host "Executing test App..."
-./OpenTelemetry.AotCompatibility.TestApp
+$app
Write-Host "Finished executing test App"
if ($LastExitCode -ne 0)
@@ -28,7 +37,7 @@ if ($LastExitCode -ne 0)
Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode
}
-popd
+Pop-Location
$testPassed = 0
if ($actualWarningCount -ne $expectedWarningCount)
diff --git a/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj b/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj
index 7c7ca3a5dc..f982a95588 100644
--- a/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj
+++ b/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj
@@ -3,7 +3,7 @@
Exe
net8.0
- true
+ true
false
true
@@ -11,7 +11,7 @@