From 0fa67983832af23afbcd9100f57dfef1b106aa6e Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Tue, 20 Oct 2026 11:47:38 -0400 Subject: [PATCH] Match NuGet audit diagnostics, not bare codes, in the release SSMS build step Directory.Build.props puts NU1903;NU1904 in WarningsAsErrors (#654), so MSBuild passes them to csc as /warnaserror+:...NU1903,NU1904 and the bare-code pattern matched the compiler command line. v1.31.0's release run (39448831126) raised a false "SSMS restore failed the NuGet audit" warning from it; that log has no real NU1903/NU1904 diagnostic. The pattern now requires 'warning NU190x:' or 'error NU190x:'. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UoaQ2xKMpZEXvm4HncT8ND --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d9da06f..1998d08d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,7 +120,9 @@ jobs: # lacks the Visual Studio extension-development workload. $msbuildLog = Join-Path $env:RUNNER_TEMP 'ssms-msbuild.log' msbuild src/PlanViewer.Ssms/PlanViewer.Ssms.csproj -restore -t:Build -p:Configuration=Release -p:DeployExtension=false | Tee-Object -FilePath $msbuildLog - $auditHit = Select-String -Path $msbuildLog -Pattern 'NU1903|NU1904' | Select-Object -First 1 + # Match the diagnostic itself: Directory.Build.props puts NU1903;NU1904 in + # WarningsAsErrors, so the bare codes also appear in csc's /warnaserror+ list. + $auditHit = Select-String -Path $msbuildLog -Pattern '(warning|error) NU190[34]:' | Select-Object -First 1 if ($auditHit) { Write-Host "::warning::SSMS restore failed the NuGet audit: $($auditHit.Line.Trim())" }