From 25c86fb2b2a167ca9030230df7d52d2936878407 Mon Sep 17 00:00:00 2001
From: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Date: Fri, 20 Nov 2026 06:27:16 +0000
Subject: [PATCH 1/2] fix: align production Roslyn package versions
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
---
.../IntelliTect.Analyzer.CodeFixes.csproj | 2 +-
.../IntelliTect.Analyzer/IntelliTect.Analyzer.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
index 4cbf5dc1..6c5e0348 100644
--- a/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
+++ b/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
index c640096b..b9cbf1f7 100644
--- a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
+++ b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
@@ -24,7 +24,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
From 335d48318dedc685e8cb3e00c71a0dbae78366b9 Mon Sep 17 00:00:00 2001
From: Benjamin Michaelis
Date: Fri, 20 Nov 2026 20:18:18 -0800
Subject: [PATCH 2/2] fix(analyzer): preserve older Roslyn host compatibility
Restore production Roslyn 4.8.0 overrides. Pin compatibility jobs to their matrix SDK, install the built package from its actual path in an isolated cache, and stop on installation failures.
---
.github/workflows/dotnetBuild.yml | 21 ++++++++++++++++---
.../IntelliTect.Analyzer.CodeFixes.csproj | 2 +-
.../IntelliTect.Analyzer.csproj | 2 +-
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/dotnetBuild.yml b/.github/workflows/dotnetBuild.yml
index 5767040f..b4ec80a0 100644
--- a/.github/workflows/dotnetBuild.yml
+++ b/.github/workflows/dotnetBuild.yml
@@ -88,12 +88,27 @@ jobs:
- name: Verify analyzer loads without CS9057
run: |
mkdir test-project && cd test-project
+ $sdkPrefix = '${{ matrix.sdk }}'.Replace('x', '')
+ $sdkVersion = dotnet --list-sdks |
+ ForEach-Object { ($_ -split ' ')[0] } |
+ Where-Object { $_.StartsWith($sdkPrefix) } |
+ Sort-Object { [version]$_ } -Descending |
+ Select-Object -First 1
+ if (-not $sdkVersion) {
+ throw "No installed SDK matches $sdkPrefix"
+ }
+ @{ sdk = @{ version = $sdkVersion; rollForward = 'disable' } } |
+ ConvertTo-Json | Set-Content global.json
+ dotnet --version
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet new console
- # Add local package source and install the just-built analyzer
- dotnet nuget add source (Resolve-Path ../nupkg) --name local
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+ $env:NUGET_PACKAGES = Join-Path (Get-Location).Path '.nuget'
+ $packageSource = (Resolve-Path ../nupkg).Path
$pkg = Get-ChildItem ../nupkg/*.nupkg | Select-Object -First 1
$version = [regex]::Match($pkg.Name, '(\d+\.\d+\.\d+.*)\.nupkg$').Groups[1].Value
- dotnet add package IntelliTect.Analyzers --version $version --source local
+ dotnet add package IntelliTect.Analyzers --version $version --source $packageSource
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# Build and check for CS9057 (analyzer references newer compiler than SDK provides)
$output = dotnet build 2>&1
$output | Write-Output
diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
index 6c5e0348..4cbf5dc1 100644
--- a/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
+++ b/IntelliTect.Analyzer/IntelliTect.Analyzer.CodeFixes/IntelliTect.Analyzer.CodeFixes.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
index b9cbf1f7..c640096b 100644
--- a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
+++ b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj
@@ -24,7 +24,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive