diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 781fe3c..f88bae6 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,14 +3,14 @@
"isRoot": true,
"tools": {
"powershell": {
- "version": "7.6.1",
+ "version": "7.6.2",
"commands": [
"pwsh"
],
"rollForward": false
},
"dotnet-coverage": {
- "version": "18.6.2",
+ "version": "18.8.0",
"commands": [
"dotnet-coverage"
],
@@ -31,7 +31,7 @@
"rollForward": false
},
"nerdbank.dotnetrepotools": {
- "version": "1.3.22",
+ "version": "1.5.15",
"commands": [
"repo"
],
diff --git a/.github/skills/bundle-dependency-prs/SKILL.md b/.github/skills/bundle-dependency-prs/SKILL.md
new file mode 100644
index 0000000..48dedbe
--- /dev/null
+++ b/.github/skills/bundle-dependency-prs/SKILL.md
@@ -0,0 +1,46 @@
+---
+name: bundle-dependency-prs
+description: Fix broken dependency update PRs and aggregate the ones that work into one PR.
+disable-model-invocation: true
+---
+
+# Instructions
+
+You have two goals:
+
+1. Get all dependency PRs to a state where their PR checks pass.
+2. Aggregate dependency PRs with passing checks into just one PR.
+
+You can identify dependency update PRs by those authored by `dependabot` or `renovate`.
+
+You'll find instructions for building and validating the repo in the [CONTRIBUTING.md](../../../CONTRIBUTING.md) doc.
+Always validate your changes locally before pushing them to the remote repository.
+
+When writing PR bodies or comments, avoid unmatched markdown code fences. Keep markdown well-formed.
+
+For purposes of assessing PR readiness by its PR checks, consider docfx related checks to be irrelevant.
+If a docfx check fails but all other checks succeed, then that is a 'successful' dependency update PR.
+
+## Fix up dependency PRs with failing checks
+
+Before aggregating PRs, first try to fix any individual dependency update PRs with failing build/test checks.
+
+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.
+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
+
+Your next goal is to collect all the dependency updates that are ready to go into a single PR.
+
+1. Prepare a local branch called `bulkDepUpdates`.
+ 1. Consider that a remote branch by the same name may already exist. If it does, base your local branch on it.
+ 2. Merge `origin/main` into this branch.
+ 3. Resolve any conflicts.
+2. For the dependency PRs whose build and test PR checks already pass, merge them into the `bulkDepUpdates` branch.
+ Consider that your local branch may have already merged an equivalent PR in the past (from a past run). If so, you should skip merging that PR.
+ Resolve any conflicts.
+ Build and run tests to validate your branch.
+3. Push the branch.
+4. Create a PR, if one does not already exist.
diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml
index 3c032fa..d933871 100644
--- a/.github/workflows/copilot-setup-steps.yml
+++ b/.github/workflows/copilot-setup-steps.yml
@@ -26,7 +26,7 @@ jobs:
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index fbfcd14..99b3c05 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -24,7 +24,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml
index 9c6b1be..0297d6e 100644
--- a/.github/workflows/docs_validate.yml
+++ b/.github/workflows/docs_validate.yml
@@ -12,7 +12,7 @@ jobs:
name: 📚 Doc validation
runs-on: ubuntu-24.04
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: 🔗 Markup Link Checker (mlc)
diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml
index 62a6417..fc8a631 100644
--- a/.github/workflows/libtemplate-update.yml
+++ b/.github/workflows/libtemplate-update.yml
@@ -17,7 +17,7 @@ jobs:
contents: write
pull-requests: write
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9cc58ae..4470d9c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -38,7 +38,11 @@ This repository can be built on Windows, Linux, and OSX.
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.).
-[pwsh]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell
+## Testing
+
+You can use `dotnet test` to build and/or test the repo.
+
+There may be tests that are known to be unstable or have special requirements. These can be avoided by running tests using the [dotnet-test-cloud.ps1](tools/dotnet-test-cloud.ps1) script *after* running `dotnet build`.
## Releases
@@ -95,3 +99,5 @@ git checkout origin/main
# resolve any conflicts, then commit the merge commit.
git push origin -u HEAD
```
+
+[pwsh]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 5473626..1d3afb0 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -4,7 +4,7 @@
true
true
- 2.2.2
+ 2.2.3
2.0.226
@@ -17,7 +17,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
diff --git a/global.json b/global.json
index 00e706b..ac951c1 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "10.0.204",
+ "version": "10.0.301",
"rollForward": "patch",
"allowPrerelease": false
},
diff --git a/tools/GitHubActions.ps1 b/tools/GitHubActions.ps1
new file mode 100644
index 0000000..c742a58
--- /dev/null
+++ b/tools/GitHubActions.ps1
@@ -0,0 +1,18 @@
+function Add-GitHubActionsEnvVariable {
+ param(
+ [string]$Path = $env:GITHUB_ENV,
+ [Parameter(Mandatory = $true)]
+ [string]$Name,
+ [Parameter(Mandatory = $true)]
+ [AllowEmptyString()]
+ [string]$Value
+ )
+
+ if ([string]::IsNullOrWhiteSpace($Name)) {
+ throw "GitHub Actions environment variable names 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)
+}
diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1
index 590581e..d9d35bb 100644
--- a/tools/Install-DotNetSdk.ps1
+++ b/tools/Install-DotNetSdk.ps1
@@ -59,7 +59,10 @@ $runtimeVersions = @()
$windowsDesktopRuntimeVersions = @()
$aspnetRuntimeVersions = @()
if (!$SdkOnly) {
- Get-ChildItem "$PSScriptRoot\..\src\*.*proj", "$PSScriptRoot\..\test\*.*proj", "$PSScriptRoot\..\Directory.Build.props" -Recurse | % {
+ $projFiles = Get-ChildItem "$PSScriptRoot\..\src\*.*proj", "$PSScriptRoot\..\test\*.*proj" -Recurse
+ $projFiles += Get-ChildItem "$PSScriptRoot\..\src\Directory.Build.props", "$PSScriptRoot\..\test\Directory.Build.props" -Recurse
+ $projFiles += Get-Item -LiteralPath "$PSScriptRoot\..\Directory.Build.props"
+ $projFiles | % {
$projXml = [xml](Get-Content -LiteralPath $_)
$pg = $projXml.Project.PropertyGroup
if ($pg) {
diff --git a/tools/Set-EnvVars.ps1 b/tools/Set-EnvVars.ps1
index 2bd3ca4..0816c0e 100644
--- a/tools/Set-EnvVars.ps1
+++ b/tools/Set-EnvVars.ps1
@@ -12,13 +12,15 @@
The CmdEnvScriptPath environment variable may be optionally set to a path to a cmd shell script to be created (or appended to if it already exists) that will set the environment variables in cmd.exe that are set within the PowerShell environment.
This is used by init.cmd in order to reapply any new environment variables to the parent cmd.exe process that were set in the powershell child process.
#>
-[CmdletBinding(SupportsShouldProcess=$true)]
+[CmdletBinding(SupportsShouldProcess = $true)]
Param(
- [Parameter(Mandatory=$true, Position=1)]
+ [Parameter(Mandatory = $true, Position = 1)]
$Variables,
[string[]]$PrependPath
)
+. "$PSScriptRoot\GitHubActions.ps1"
+
if ($Variables.Count -eq 0) {
return $true
}
@@ -27,7 +29,8 @@ $cmdInstructions = !$env:TF_BUILD -and !$env:GITHUB_ACTIONS -and !$env:CmdEnvScr
if ($cmdInstructions) {
Write-Warning "Environment variables have been set that will be lost because you're running under cmd.exe"
Write-Host "Environment variables that must be set manually:" -ForegroundColor Blue
-} else {
+}
+else {
Write-Host "Environment variables set:" -ForegroundColor Blue
Write-Host ($Variables | Out-String)
if ($PrependPath) {
@@ -44,7 +47,7 @@ if ($env:GITHUB_ACTIONS) {
}
$CmdEnvScript = ''
-$Variables.GetEnumerator() |% {
+$Variables.GetEnumerator() | % {
Set-Item -LiteralPath env:$($_.Key) -Value $_.Value
# If we're running in a cloud CI, set these environment variables so they propagate.
@@ -52,7 +55,7 @@ $Variables.GetEnumerator() |% {
Write-Host "##vso[task.setvariable variable=$($_.Key);]$($_.Value)"
}
if ($env:GITHUB_ACTIONS) {
- Add-Content -LiteralPath $env:GITHUB_ENV -Value "$($_.Key)=$($_.Value)"
+ Add-GitHubActionsEnvVariable -Name $_.Key -Value ([string]$_.Value)
}
if ($cmdInstructions) {
@@ -68,7 +71,7 @@ if ($IsMacOS -or $IsLinux) {
}
if ($PrependPath) {
- $PrependPath |% {
+ $PrependPath | % {
$newPathValue = "$_$pathDelimiter$env:PATH"
Set-Item -LiteralPath env:PATH -Value $newPathValue
if ($cmdInstructions) {
@@ -79,7 +82,7 @@ if ($PrependPath) {
Write-Host "##vso[task.prependpath]$_"
}
if ($env:GITHUB_ACTIONS) {
- Add-Content -LiteralPath $env:GITHUB_PATH -Value $_
+ Add-GitHubActionsEnvVariable -Name PATH -Value $newPathValue
}
$CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%"
diff --git a/tools/variables/_define.ps1 b/tools/variables/_define.ps1
index d40e5cf..dfa9cba 100644
--- a/tools/variables/_define.ps1
+++ b/tools/variables/_define.ps1
@@ -11,6 +11,8 @@
param (
)
+. "$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.
$keyCaps = $_.Key.ToUpper()
@@ -24,7 +26,7 @@ param (
# and the second that works across jobs and stages but must be fully qualified when referenced.
Write-Host "##vso[task.setvariable variable=$keyCaps;isOutput=true]$($_.Value)"
} elseif ($env:GITHUB_ACTIONS) {
- Add-Content -LiteralPath $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)"
+ Add-GitHubActionsEnvVariable -Name $keyCaps -Value ([string]$_.Value)
}
Set-Item -LiteralPath "env:$keyCaps" -Value $_.Value
}