From 4299650d88d492c5d1725c81c55e4e734e477c73 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 7 Jul 2026 16:25:20 -0600 Subject: [PATCH 01/16] Fix typo --- .github/skills/bundle-dependency-prs/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/skills/bundle-dependency-prs/SKILL.md b/.github/skills/bundle-dependency-prs/SKILL.md index 48dedbe9..3fec6683 100644 --- a/.github/skills/bundle-dependency-prs/SKILL.md +++ b/.github/skills/bundle-dependency-prs/SKILL.md @@ -27,7 +27,7 @@ Before aggregating PRs, first try to fix any individual dependency update PRs wi 1. For the dependency PRs with failing build or test PR checks, check out their source branch and fix any issues. 2. Push your fixes as fresh commits to the individual dependency PRs. - If pushing to a repo in the `microsoft` org when the PR is authord by `renovate`, follow-up the push with a PR comment that says exactly this: "/azp run" which triggers PR checks to re-run. + If pushing to a repo in the `microsoft` org when the PR is authored by `renovate`, follow-up the push with a PR comment that says exactly this: "/azp run" which triggers PR checks to re-run. 3. If you can't fix a particular PR, add a comment to the PR describing your attempt and outcome. ## Group dependency PRs that are ready to go From 90ac1ee05f361d25ff36e42ce217316768c2ee11 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 7 Jul 2026 16:32:43 -0600 Subject: [PATCH 02/16] Use preferred pattern for appending to PATH in GitHub Actions --- tools/GitHubActions.ps1 | 15 +++++++++++++++ tools/Set-EnvVars.ps1 | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1 index c742a588..8678d0da 100644 --- a/tools/GitHubActions.ps1 +++ b/tools/GitHubActions.ps1 @@ -16,3 +16,18 @@ function Add-GitHubActionsEnvVariable { $delimiter = [guid]::NewGuid().ToString('N') [System.IO.File]::AppendAllText($Path, "$Name<<$delimiter`n$Value`n$delimiter`n", $utf8NoBom) } + +function Add-GitHubActionsPath { + param( + [string]$Path = $env:GITHUB_PATH, + [Parameter(Mandatory = $true)] + [string]$Value + ) + + if ([string]::IsNullOrWhiteSpace($Path)) { + throw "GitHub Actions path file must not be empty." + } + + $utf8NoBom = [System.Text.UTF8Encoding]::new($false) + [System.IO.File]::AppendAllText($Path, "$Value`n", $utf8NoBom) +} diff --git a/tools/Set-EnvVars.ps1 b/tools/Set-EnvVars.ps1 index 0816c0e2..c2d95b8f 100644 --- a/tools/Set-EnvVars.ps1 +++ b/tools/Set-EnvVars.ps1 @@ -82,7 +82,7 @@ if ($PrependPath) { Write-Host "##vso[task.prependpath]$_" } if ($env:GITHUB_ACTIONS) { - Add-GitHubActionsEnvVariable -Name PATH -Value $newPathValue + Add-GitHubActionsPath -Value $_ } $CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%" From 5a0a13fe6340618056b81b8e1d90092fc012ff03 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 7 Jul 2026 16:51:06 -0600 Subject: [PATCH 03/16] Avoid loading GitHubActions.ps1 on Azure Pipelines --- tools/variables/_define.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/variables/_define.ps1 b/tools/variables/_define.ps1 index dfa9cba4..90fd080d 100644 --- a/tools/variables/_define.ps1 +++ b/tools/variables/_define.ps1 @@ -11,7 +11,9 @@ param ( ) -. "$PSScriptRoot\..\GitHubActions.ps1" +if ($env:GITHUB_ACTIONS) { + . "$PSScriptRoot\..\GitHubActions.ps1" +} (& "$PSScriptRoot\_all.ps1").GetEnumerator() |% { # Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive. From 097060adc6c79e0aa7cb16ec4995e868c7350b44 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 7 Jul 2026 17:42:55 -0600 Subject: [PATCH 04/16] Validate Path parameter in Add-GitHubActionsEnvVariable --- tools/GitHubActions.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1 index 8678d0da..1546d991 100644 --- a/tools/GitHubActions.ps1 +++ b/tools/GitHubActions.ps1 @@ -8,6 +8,10 @@ function Add-GitHubActionsEnvVariable { [string]$Value ) + if ([string]::IsNullOrWhiteSpace($Path)) { + throw "GitHub Actions environment file must not be empty." + } + if ([string]::IsNullOrWhiteSpace($Name)) { throw "GitHub Actions environment variable names must not be empty." } From 5cd226ad1977e1fc3150ccf6614b3afd81c0b3b4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 07:46:02 -0600 Subject: [PATCH 05/16] Fix 1ES PT nuget push --- azure-pipelines/prepare-insertion-stages.yml | 2 +- azure-pipelines/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/prepare-insertion-stages.yml b/azure-pipelines/prepare-insertion-stages.yml index 675912bc..d7723325 100644 --- a/azure-pipelines/prepare-insertion-stages.yml +++ b/azure-pipelines/prepare-insertion-stages.yml @@ -51,7 +51,7 @@ stages: pool: name: AzurePipelines-EO demands: - - ImageOverride -equals 1ESPT-Ubuntu24.04 + - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary os: Linux templateContext: outputs: diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml index 8b7f8c90..dda671c0 100644 --- a/azure-pipelines/release.yml +++ b/azure-pipelines/release.yml @@ -33,7 +33,7 @@ extends: pool: name: AzurePipelines-EO demands: - - ImageOverride -equals 1ESPT-Ubuntu24.04 + - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary os: Linux templateContext: outputs: From b5153f6c64e58cc4cc09e44c3e8a0a76235cfdae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 07:49:19 -0600 Subject: [PATCH 06/16] Update dependency dotnet-coverage to v18.9.0 (536) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2ddce27d..9484456c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "18.8.0", + "version": "18.9.0", "commands": [ "dotnet-coverage" ], From 42c5cea6cd1a74c3fc6c41c2f92018ec6faba81c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:55:40 +0000 Subject: [PATCH 07/16] Update dependency Microsoft.Testing.Extensions.CodeCoverage to 18.9.0 (537) Co-authored-by: renovate[bot] <29139614+renovate[bot]@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 31eb8113..2e095f23 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,7 +10,7 @@ - + From e6e3c19ad90332fe95b2c9e84aafef423a8b6ac3 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 08:23:09 -0600 Subject: [PATCH 08/16] Revert "Update dependency dotnet-coverage to v18.9.0 (536)" This reverts commit b5153f6c64e58cc4cc09e44c3e8a0a76235cfdae. The dependency isn't allowed per CFS policy yet. --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9484456c..2ddce27d 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.8.0", "commands": [ "dotnet-coverage" ], From c43fba65f1989efc05d45b822c32f657705d766c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 08:42:01 -0600 Subject: [PATCH 09/16] Prevent empty paths from being added to the PATH --- tools/GitHubActions.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1 index 1546d991..fbe54390 100644 --- a/tools/GitHubActions.ps1 +++ b/tools/GitHubActions.ps1 @@ -32,6 +32,10 @@ function Add-GitHubActionsPath { throw "GitHub Actions path file must not be empty." } + if ([string]::IsNullOrWhiteSpace($Value)) { + throw "GitHub Actions path entries must not be empty." + } + $utf8NoBom = [System.Text.UTF8Encoding]::new($false) [System.IO.File]::AppendAllText($Path, "$Value`n", $utf8NoBom) } From 21218ea4bcd823a6725bcf9198eb096de7a26477 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 08:51:05 -0600 Subject: [PATCH 10/16] Fix package restore failures --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9bbdfbee..ae306be3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,7 +12,7 @@ - + @@ -35,7 +35,7 @@ - + From a4d4554915ecf1e181db41e2274969c21761d1f4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 09:15:07 -0600 Subject: [PATCH 11/16] Fix up error messages --- tools/GitHubActions.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1 index fbe54390..a2a04c5d 100644 --- a/tools/GitHubActions.ps1 +++ b/tools/GitHubActions.ps1 @@ -9,11 +9,11 @@ function Add-GitHubActionsEnvVariable { ) if ([string]::IsNullOrWhiteSpace($Path)) { - throw "GitHub Actions environment file must not be empty." + throw "GitHub Actions environment file path must not be empty." } if ([string]::IsNullOrWhiteSpace($Name)) { - throw "GitHub Actions environment variable names must not be empty." + throw "GitHub Actions environment variable name must not be empty." } $utf8NoBom = [System.Text.UTF8Encoding]::new($false) @@ -29,11 +29,11 @@ function Add-GitHubActionsPath { ) if ([string]::IsNullOrWhiteSpace($Path)) { - throw "GitHub Actions path file must not be empty." + throw "GitHub Actions path file path must not be empty." } if ([string]::IsNullOrWhiteSpace($Value)) { - throw "GitHub Actions path entries must not be empty." + throw "GitHub Actions path entry must not be empty." } $utf8NoBom = [System.Text.UTF8Encoding]::new($false) From 8201f772e034b548f6fef19445abf5495235594e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 09:18:58 -0600 Subject: [PATCH 12/16] Avoid importing GitHubActions.ps1 outside GitHub Actions --- tools/Set-EnvVars.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/Set-EnvVars.ps1 b/tools/Set-EnvVars.ps1 index c2d95b8f..c85d6941 100644 --- a/tools/Set-EnvVars.ps1 +++ b/tools/Set-EnvVars.ps1 @@ -19,7 +19,9 @@ Param( [string[]]$PrependPath ) -. "$PSScriptRoot\GitHubActions.ps1" +if ($env:GITHUB_ACTIONS) { + . "$PSScriptRoot\GitHubActions.ps1" +} if ($Variables.Count -eq 0) { return $true From 3ee5eeb3ffaad4da5b5c474d46231033bd64a6df Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 09:20:03 -0600 Subject: [PATCH 13/16] Clarify yml comment --- azure-pipelines/prepare-insertion-stages.yml | 2 +- azure-pipelines/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/prepare-insertion-stages.yml b/azure-pipelines/prepare-insertion-stages.yml index d7723325..9abd3770 100644 --- a/azure-pipelines/prepare-insertion-stages.yml +++ b/azure-pipelines/prepare-insertion-stages.yml @@ -51,7 +51,7 @@ stages: pool: name: AzurePipelines-EO demands: - - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary + - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade this job to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary os: Linux templateContext: outputs: diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml index dda671c0..a8218f05 100644 --- a/azure-pipelines/release.yml +++ b/azure-pipelines/release.yml @@ -33,7 +33,7 @@ extends: pool: name: AzurePipelines-EO demands: - - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary + - ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade this job to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary os: Linux templateContext: outputs: From 3948cdc9c039c4915500da6c63d9d3bd0ac7a40f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 09:21:17 -0600 Subject: [PATCH 14/16] Update script synopsis --- tools/variables/_define.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/variables/_define.ps1 b/tools/variables/_define.ps1 index 90fd080d..ba081f0f 100644 --- a/tools/variables/_define.ps1 +++ b/tools/variables/_define.ps1 @@ -1,7 +1,7 @@ <# .SYNOPSIS This script translates the variables returned by the _all.ps1 script - into commands that instruct Azure Pipelines to actually set those variables for other pipeline tasks to consume. + into commands that instruct Azure Pipelines or GitHub Actions to actually set those variables for other pipeline tasks to consume. The build or release definition may have set these variables to override what the build would do. So only set them if they have not already been set. From 041558c10ff2dacadee10ab3390cc0f5093a300a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 10:59:38 -0600 Subject: [PATCH 15/16] Fix failing analyzer tests --- .../App.net472.config | 11 +++++++++++ ...soft.VisualStudio.Threading.Analyzers.Tests.csproj | 1 + 2 files changed, 12 insertions(+) create mode 100644 test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config diff --git a/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config new file mode 100644 index 00000000..f47db784 --- /dev/null +++ b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/Microsoft.VisualStudio.Threading.Analyzers.Tests.csproj b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/Microsoft.VisualStudio.Threading.Analyzers.Tests.csproj index 78d772b5..a0a35434 100644 --- a/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/Microsoft.VisualStudio.Threading.Analyzers.Tests.csproj +++ b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/Microsoft.VisualStudio.Threading.Analyzers.Tests.csproj @@ -6,6 +6,7 @@ true $(NoWarn);NU1701 $(DefineConstants);WINDOWS + App.net472.config true From e8034505a7a68667bfc4fa60e8b71579423a4453 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Jul 2026 11:12:29 -0600 Subject: [PATCH 16/16] Bring CONTRIBUTING into better conformance --- CONTRIBUTING.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39e73828..05e4d16b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,19 +7,17 @@ FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -We welcome 3rd party pull requests. -For significant changes we strongly recommend opening an issue to start a design discussion first. - ## Best practices * Use Windows PowerShell or [PowerShell Core][pwsh] (including on Linux/OSX) to run .ps1 scripts. Some scripts set environment variables to help you, but they are only retained if you use PowerShell as your shell. -### Prerequisites +## Prerequisites -* [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core/2.2) with the version matching our [global.json](global.json) file. The version you install must be at least the version specified in the global.json file, and must be within the same hundreds version for the 3rd integer: x.y.Czz (x.y.C must match, and zz must be at least as high). - The easiest way to get this is to run the `init` script at the root of the repo. Use the `-InstallLocality Machine` and approve admin elevation if you wish so the SDK is always discoverable from VS. See the `init` script usage doc for more details. -* Optional: [Visual Studio 2022](https://visualstudio.microsoft.com/) +All dependencies can be installed by running the `init.ps1` script at the root of the repository +using Windows PowerShell or [PowerShell Core][pwsh] (on any OS). +Some dependencies installed by `init.ps1` may only be discoverable from the same command line environment the init script was run from due to environment variables, so be sure to launch Visual Studio or build the repo from that same environment. +Alternatively, run `init.ps1 -InstallLocality Machine` (which may require elevation) in order to install dependencies at machine-wide locations so Visual Studio and builds work everywhere. The only prerequisite for building, testing, and deploying from this repository is the [.NET SDK](https://get.dot.net/). @@ -37,12 +35,9 @@ to the feeds that packages for this repo come from, if any. ## Building -This project can be built with the follow commands from a Visual Studio Developer Command Prompt, -assuming the working directory is the root of this repository: +This repository can be built on Windows, Linux, and OSX. -```ps1 -msbuild src -``` +Building, testing, and packing this repository can be done by using the standard dotnet CLI commands (e.g. `dotnet build`, `dotnet test`, `dotnet pack`, etc.). ## Testing