From da6ecb0abb56f12983c1c18aa57fa08c4e6343f8 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:11:44 +0200 Subject: [PATCH 01/17] Re-enable Linux code coverage to reproduce instrumentation AccessViolationException, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93e45bfd..c9b778a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,12 +88,7 @@ jobs: git config --global user.email me@ci.com Write-Host "🧪 Run tests" - # Code coverage instrumentation is disabled on Linux because the coverage engine's - # shared-memory probe buffers are unmapped while instrumented code is still writing to - # them, crashing the test host with an AccessViolationException. - # The Windows leg still uploads coverage to codecov.io. - $noCoverage = '${{ runner.os }}' -eq 'Linux' - tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} -PublishResults -NoCoverage:$noCoverage + tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} -PublishResults shell: pwsh timeout-minutes: 15 - name: 🧪 test x86 @@ -128,7 +123,6 @@ jobs: ./tools/publish-CodeCov.ps1 -CodeCovToken '${{ secrets.CODECOV_TOKEN }}' -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" } shell: pwsh - if: runner.os != 'Linux' timeout-minutes: 3 required_status_checks: From fad697e2d08bcf954b95bd8dbb142cbae36f9972 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:27:35 +0200 Subject: [PATCH 02/17] Revert deterministic MSBuild dispose to reintroduce AccessViolationException repro, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../BuildIntegrationTests.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs b/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs index 2931dee9..24731d93 100644 --- a/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs +++ b/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs @@ -446,18 +446,6 @@ protected void MakeItAVBProject() protected override void Dispose(bool disposing) { Environment.SetEnvironmentVariable("_NBGV_UnitTest", string.Empty); - - if (disposing) - { - // Release the MSBuild resources deterministically. Without this, each test leaks an in-proc - // build node and the assembly load contexts it created, which are only torn down later at a - // non-deterministic GC/finalization point while other tests are still running. - this.buildManager?.Dispose(); - this.buildManager = null; - this.projectCollection?.Dispose(); - this.projectCollection = null; - } - base.Dispose(disposing); } From a94be6799c5705989aa1acb24e314a198f37e62f Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:44:06 +0200 Subject: [PATCH 03/17] Retrigger CI to attempt Linux coverage AccessViolationException repro, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> From 64936155d5538608312687684ff5fdd01840e524 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:44:52 +0200 Subject: [PATCH 04/17] Restore deterministic MSBuild dispose to keep PR workflow-only, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../BuildIntegrationTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs b/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs index 24731d93..2931dee9 100644 --- a/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs +++ b/test/Nerdbank.GitVersioning.Tests/BuildIntegrationTests.cs @@ -446,6 +446,18 @@ protected void MakeItAVBProject() protected override void Dispose(bool disposing) { Environment.SetEnvironmentVariable("_NBGV_UnitTest", string.Empty); + + if (disposing) + { + // Release the MSBuild resources deterministically. Without this, each test leaks an in-proc + // build node and the assembly load contexts it created, which are only torn down later at a + // non-deterministic GC/finalization point while other tests are still running. + this.buildManager?.Dispose(); + this.buildManager = null; + this.projectCollection?.Dispose(); + this.projectCollection = null; + } + base.Dispose(disposing); } From d4862c1ad96786cfe9b331ce3d2de449b60709de Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:52:53 +0200 Subject: [PATCH 05/17] Update code coverage to 18.10.0, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 56c4ec6e..7b7805ba 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "18.9.0", + "version": "18.10.0", "commands": [ "dotnet-coverage" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index 09192a64..253b54bc 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -40,7 +40,7 @@ - + From ef2d24b7f8ad9d309a8540c4103e2a465e88e85f Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 11:56:54 +0200 Subject: [PATCH 06/17] Add dnceng public test-tools feed to nuget config, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nuget.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nuget.config b/nuget.config index b60f26be..54fc857d 100644 --- a/nuget.config +++ b/nuget.config @@ -8,6 +8,7 @@ + @@ -20,5 +21,10 @@ + + + + + From 92d2c8d27447d83828675982629421dda7a41336 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 17:44:05 +0200 Subject: [PATCH 07/17] Bump Microsoft.Testing.Extensions.CodeCoverage to 18.11.0-preview.26413.3, Try preview code coverage package that may fix the Linux AccessViolationException from microsoft/codecoverage#238. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 253b54bc..26ae5a44 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -40,7 +40,7 @@ - + From 0dbee3e2ffaed890126024e1fdc253aa49dcf478 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 17:48:40 +0200 Subject: [PATCH 08/17] Map Microsoft.Testing.Platform packages to test-tools feed, Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nuget.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nuget.config b/nuget.config index 54fc857d..38b8aa63 100644 --- a/nuget.config +++ b/nuget.config @@ -23,6 +23,7 @@ + From c0d136f7415066808e5141c64b32adb35f70244a Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 17:56:19 +0200 Subject: [PATCH 09/17] Pin Microsoft.Testing.Platform packages to fix NU1603 from coverage preview, The 18.11.0-preview.26413.3 coverage bump shifted the Microsoft.Testing.Platform graph so xunit.v3.core.mtp-v2's transitive request for Microsoft.Testing.Platform.MSBuild >= 2.0.2 got substituted to 2.1.0 (NU1603), which fails under TreatWarningsAsErrors. Explicitly pin Microsoft.Testing.Platform and Microsoft.Testing.Platform.MSBuild to $(MicrosoftTestingPlatformVersion) (2.3.3) so the whole family is aligned and no substitution occurs. Also revert the Microsoft.Testing.Platform* test-tools feed mapping: the dnceng test-tools feed only hosts 1.0.0-alpha of those packages, so mapping them there would break restore. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 2 ++ nuget.config | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 26ae5a44..1bb7fe82 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -41,6 +41,8 @@ + + diff --git a/nuget.config b/nuget.config index 38b8aa63..54fc857d 100644 --- a/nuget.config +++ b/nuget.config @@ -23,7 +23,6 @@ - From 9cae3c800d39ceadd5187b88e609af1a16ec8120 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:03:19 +0200 Subject: [PATCH 10/17] Bump Microsoft.Testing.Platform to 2.4.0-preview.26411.1 to clear NU1109, The 18.11.0-preview.26413.3 coverage package transitively requires Microsoft.Testing.Platform >= 2.4.0-preview.26411.1, so pinning the family at 2.3.3 triggered an NU1109 package downgrade. Raise $(MicrosoftTestingPlatformVersion) to 2.4.0-preview.26411.1 (drives Platform, .MSBuild, and the CrashDump/HangDump/Telemetry/TrxReport extensions). All are published on nuget.org and the dnceng test-tools feed at this version. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1bb7fe82..c1c8b79d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ true true - 2.3.3 + 2.4.0-preview.26411.1 0.15.8 16.11.6 From 1e1b137f4524c670f1edeed3b6b28d799be4343e Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:05:51 +0200 Subject: [PATCH 11/17] Resolve Microsoft.Testing.Platform packages from test-tools feed, Now that 2.4.0-preview.26411.1 of Microsoft.Testing.Platform and Microsoft.Testing.Platform.MSBuild are published on the dnceng test-tools feed, map them there via packageSourceMapping so the preview platform packages come from the same feed as the coverage preview. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nuget.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nuget.config b/nuget.config index 54fc857d..38b8aa63 100644 --- a/nuget.config +++ b/nuget.config @@ -23,6 +23,7 @@ + From c873da29ef768822246998d72e8557e251107602 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:11:10 +0200 Subject: [PATCH 12/17] fix, --- nuget.config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nuget.config b/nuget.config index 38b8aa63..b80984c1 100644 --- a/nuget.config +++ b/nuget.config @@ -23,7 +23,12 @@ - + + + + + + From e74ad6488a4f1de343d2bdc9867996e5010e31ef Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:13:46 +0200 Subject: [PATCH 13/17] Map all Microsoft.Testing.* packages to the test-tools feed, The 2.4.0-preview.26411.1 platform bump broke restore with NU1102: the CrashDump/HangDump/Telemetry/TrxReport extensions at that preview version are published only on the dnceng test-tools feed, not nuget.org, but they were routed to nuget via the catch-all mapping. Broaden the test-tools mapping to Microsoft.Testing.* so the whole family resolves there, and mirror Microsoft.Testing.* / Microsoft.CodeCoverage* under the nuget source at equal pattern length so both feeds are considered and any package not on test-tools still falls back to nuget. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nuget.config | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nuget.config b/nuget.config index b80984c1..cdcb4075 100644 --- a/nuget.config +++ b/nuget.config @@ -17,18 +17,14 @@ + + - - - - - - - + From 7617a52d73c27cd1bfb8af4a4bd51880524b6ac9 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:16:41 +0200 Subject: [PATCH 14/17] fixing feed, --- nuget.config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nuget.config b/nuget.config index b80984c1..fa7dca50 100644 --- a/nuget.config +++ b/nuget.config @@ -9,6 +9,7 @@ + @@ -23,14 +24,17 @@ + + + + - - + From eea7eda6883552406c4c0584591465012f6581ff Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:19:58 +0200 Subject: [PATCH 15/17] fixing again, --- nuget.config | 2 -- 1 file changed, 2 deletions(-) diff --git a/nuget.config b/nuget.config index 0541464a..fa7dca50 100644 --- a/nuget.config +++ b/nuget.config @@ -18,8 +18,6 @@ - - From c041c24d1a23181a33f62a9040e93f85ca3f8a4a Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:22:10 +0200 Subject: [PATCH 16/17] one more try, --- nuget.config | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nuget.config b/nuget.config index fa7dca50..32258867 100644 --- a/nuget.config +++ b/nuget.config @@ -30,11 +30,10 @@ - - - - - + + + + From 210d371edca9d98fe75f9a13384e2a1f992234a2 Mon Sep 17 00:00:00 2001 From: fhnaseer Date: Thu, 13 Aug 2026 18:23:32 +0200 Subject: [PATCH 17/17] again, --- nuget.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nuget.config b/nuget.config index 32258867..0f13b2c9 100644 --- a/nuget.config +++ b/nuget.config @@ -34,6 +34,7 @@ +