diff --git a/.github/skills/bundle-dependency-prs/SKILL.md b/.github/skills/bundle-dependency-prs/SKILL.md
index 48dedbe9b..3fec66838 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
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 39e738280..05e4d16b1 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
diff --git a/Directory.Packages.props b/Directory.Packages.props
index faec00452..ae306be39 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -12,7 +12,7 @@
-
+
@@ -35,7 +35,7 @@
-
+
@@ -46,7 +46,7 @@
-
+
diff --git a/azure-pipelines/prepare-insertion-stages.yml b/azure-pipelines/prepare-insertion-stages.yml
index 42a1ef6df..e127a146f 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 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 845d080ca..d1e88f74f 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 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/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/App.net472.config
new file mode 100644
index 000000000..f47db784d
--- /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 78d772b56..a0a354341 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
diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1
index c742a5888..a2a04c5df 100644
--- a/tools/GitHubActions.ps1
+++ b/tools/GitHubActions.ps1
@@ -8,11 +8,34 @@ function Add-GitHubActionsEnvVariable {
[string]$Value
)
+ if ([string]::IsNullOrWhiteSpace($Path)) {
+ 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)
$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 path must not be empty."
+ }
+
+ if ([string]::IsNullOrWhiteSpace($Value)) {
+ throw "GitHub Actions path entry 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 0816c0e2c..c85d6941a 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
@@ -82,7 +84,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%"
diff --git a/tools/variables/_define.ps1 b/tools/variables/_define.ps1
index dfa9cba42..ba081f0fd 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.
@@ -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.