From 648355746406d1bf4fe95cb14d6ee102974fbc01 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 25 Jul 2025 10:09:51 -0600 Subject: [PATCH 01/51] Update becheran/mlc action to v1 --- .github/workflows/docs_validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 391289a4..35921d06 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -17,7 +17,7 @@ jobs: with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@88c9db09b8dabab813a2edd13f955b36aa73657a # v0.22.0 + uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://msrc.microsoft.com/*,https://www.microsoft.com/msrc*,https://microsoft.com/msrc* - name: โš™ Install prerequisites From 8eb458b8381ac2fe279d765f1084eb16af4fb99a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 25 Jul 2025 19:46:32 -0600 Subject: [PATCH 02/51] Disable credscan task on unofficial builds --- azure-pipelines/libtemplate-update.yml | 2 ++ azure-pipelines/unofficial.yml | 2 ++ azure-pipelines/vs-validation.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/azure-pipelines/libtemplate-update.yml b/azure-pipelines/libtemplate-update.yml index 3d7fb7e3..384be7cf 100644 --- a/azure-pipelines/libtemplate-update.yml +++ b/azure-pipelines/libtemplate-update.yml @@ -35,6 +35,8 @@ extends: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Windows2022 + credscan: + enabled: false stages: - stage: Merge diff --git a/azure-pipelines/unofficial.yml b/azure-pipelines/unofficial.yml index 9ca100ea..d7232735 100644 --- a/azure-pipelines/unofficial.yml +++ b/azure-pipelines/unofficial.yml @@ -57,6 +57,8 @@ extends: parameters: sdl: sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES + credscan: + enabled: false suppression: suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress enableProductionSDL: ${{ parameters.EnableProductionSDL }} diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml index 3a40395e..b9d46b7c 100644 --- a/azure-pipelines/vs-validation.yml +++ b/azure-pipelines/vs-validation.yml @@ -28,6 +28,8 @@ extends: parameters: sdl: sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES + credscan: + enabled: false stages: - stage: Build From 28382fd802f19e1d3262dbf95c50ebdcee97c3fa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 07:20:08 -0600 Subject: [PATCH 03/51] Update mcr.microsoft.com/dotnet/sdk:9.0.303-noble Docker digest to a990afa Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 05ddebad..881dafec 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.303-noble@sha256:af75742bd2f6fd148504951b57a983bc410191729bf543eae467528d1bc175e5 +FROM mcr.microsoft.com/dotnet/sdk:9.0.303-noble@sha256:a990afa820aa77df1cc3a7eaf471eb7cddf5f8233d739297400e0ce7ff0762bd # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From f9374d9cc10ae59fd134a9ee7262fa189eca2945 Mon Sep 17 00:00:00 2001 From: Tyler Dunkel <40210514+tydunkel@users.noreply.github.com> Date: Wed, 30 Jul 2025 11:09:51 -0700 Subject: [PATCH 04/51] Pass through System.AccessToken when real signing on non-Windows builds (#396) --- azure-pipelines/build.yml | 2 ++ azure-pipelines/dotnet.yml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index b69a9f5c..e91da614 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -246,6 +246,7 @@ jobs: parameters: Is1ESPT: ${{ parameters.Is1ESPT }} RunTests: ${{ parameters.RunTests }} + BuildRequiresAccessToken: ${{ parameters.RealSign }} # Real signing on non-Windows machines requires passing through access token to build steps that sign - ${{ if parameters.EnableDotNetFormatCheck }}: - script: dotnet format --verify-no-changes displayName: ๐Ÿ’… Verify formatted code @@ -282,6 +283,7 @@ jobs: parameters: Is1ESPT: ${{ parameters.Is1ESPT }} RunTests: ${{ parameters.RunTests }} + BuildRequiresAccessToken: ${{ parameters.RealSign }} # Real signing on non-Windows machines requires passing through access token to build steps that sign - template: expand-template.yml - job: WrapUp diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 2abca9eb..947cfc1a 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -5,11 +5,17 @@ parameters: default: false - name: Is1ESPT type: boolean +- name: BuildRequiresAccessToken + type: boolean + default: false steps: - script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904,LOCTASK002 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog" displayName: ๐Ÿ›  dotnet build + ${{ if parameters.BuildRequiresAccessToken }}: + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - ${{ if not(parameters.IsOptProf) }}: - powershell: tools/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults From 6f665e45309c0232f50b36dc7250f7f23af1eabe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 22:16:37 -0600 Subject: [PATCH 05/51] Update mcr.microsoft.com/dotnet/sdk:9.0.303-noble Docker digest to 14fad15 (#397) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 881dafec..738001ec 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.303-noble@sha256:a990afa820aa77df1cc3a7eaf471eb7cddf5f8233d739297400e0ce7ff0762bd +FROM mcr.microsoft.com/dotnet/sdk:9.0.303-noble@sha256:14fad15702d25fec7ff1532b762abd323fc7549c9b8a713b5871b88dc989053d # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From c2b6afa61b52ce4b643682574ddc7e958ecc48ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:38:46 -0600 Subject: [PATCH 06/51] Update Dockerfile and global.json updates to v9.0.304 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 738001ec..07702589 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.303-noble@sha256:14fad15702d25fec7ff1532b762abd323fc7549c9b8a713b5871b88dc989053d +FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:39ca82d31517e698dcd47f668d53041ec95cca8b783d8134c3053a9769492603 # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index a982cdef..aee1f8eb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.303", + "version": "9.0.304", "rollForward": "patch", "allowPrerelease": false } From eb42f5f05592b74e9701cbac7b1976d8f05677c3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 19:20:59 -0600 Subject: [PATCH 07/51] Update actions/download-artifact action to v5 (#399) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e37811d6..05a8c8ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: Echo "runid=$runid" >> $env:GITHUB_OUTPUT - name: ๐Ÿ”ป Download deployables artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 with: name: deployables-Linux path: ${{ runner.temp }}/deployables From 801d690548323e7731c92cc760620ea0fe6e4bff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 19:48:40 -0600 Subject: [PATCH 08/51] Update mcr.microsoft.com/dotnet/sdk:9.0.304-noble Docker digest to 1f7ccf8 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 07702589..792d7e86 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:39ca82d31517e698dcd47f668d53041ec95cca8b783d8134c3053a9769492603 +FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:1f7ccf88e076bc1cb1ddbd81959fb55b886b01851b092867bb7a638435fa1f1f # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From 78241e391b86b2840d6ebd780d4a7be3028e83c1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 9 Aug 2025 11:45:05 -0600 Subject: [PATCH 09/51] Add copilot-instructions.md file --- .github/copilot-instructions.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..942d81d9 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,22 @@ +# Copilot instructions for this repository + +## High level guidance + +* Review the `CONTRIBUTING.md` file for instructions to build and test the software. +* Set the `NBGV_GitEngine` environment variable to `Disabled` before running any `dotnet` or `msbuild` commands. + +## Software Design + +* Design APIs to be highly testable, and all functionality should be tested. +* Avoid introducing binary breaking changes in public APIs of projects under `src` unless their project files have `IsPackable` set to `false`. + +## Testing + +* There should generally be one test project (under the `test` directory) per shipping project (under the `src` directory). Test projects are named after the project being tested with a `.Test` suffix. +* Tests should use the Xunit testing framework. + +## Coding style + +* Honor StyleCop rules and fix any reported build warnings *after* getting tests to pass. +* In C# files, use namespace *statements* instead of namespace *blocks* for all new files. +* Add API doc comments to all new public and internal members. From 28cfd93db8ccb2a5e25de629eb4504054a4c3704 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 10 Aug 2025 08:25:04 -0600 Subject: [PATCH 10/51] Fix up contributing to work better on linux --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4281f299..990402db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,9 +53,9 @@ Push the tag. When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI. Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release. -After publishing the release, the `.github\workflows\release.yml` workflow will be automatically triggered, which will: +After publishing the release, the `.github/workflows/release.yml` workflow will be automatically triggered, which will: -1. Find the most recent `.github\workflows\build.yml` GitHub workflow run of the tagged release. +1. Find the most recent `.github/workflows/build.yml` GitHub workflow run of the tagged release. 1. Upload the `deployables` artifact from that workflow run to your GitHub Release. 1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org. @@ -92,7 +92,7 @@ The best way to keep your repo in sync with Library.Template's evolving features ```ps1 git fetch git checkout origin/main -.\tools\MergeFrom-Template.ps1 +./tools/MergeFrom-Template.ps1 # resolve any conflicts, then commit the merge commit. git push origin -u HEAD ``` From c4de4d094e4f078890878e9d89090fd0b1a6a084 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 10 Aug 2025 09:19:23 -0600 Subject: [PATCH 11/51] Add copilot instructions about avoiding unstable tests --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 942d81d9..08593502 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -14,6 +14,7 @@ * There should generally be one test project (under the `test` directory) per shipping project (under the `src` directory). Test projects are named after the project being tested with a `.Test` suffix. * Tests should use the Xunit testing framework. +* Some tests are known to be unstable. When running tests, you should skip the unstable ones by running `dotnet test --filter "TestCategory!=FailsInCloudTest"`. ## Coding style From 7f486ccfc64f146f376738ee435442fbb3f81214 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:53:49 -0600 Subject: [PATCH 12/51] Update actions/checkout action to v5 (#402) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- .github/workflows/copilot-setup-steps.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/libtemplate-update.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6beb8d8..03067ad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - windows-2022 steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: โš™ Install prerequisites @@ -74,7 +74,7 @@ jobs: name: ๐Ÿ“ƒ Docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0 with: diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 053f56e9..eb69d92e 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 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 0a8f8215..6454d3c5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: โš™ Install prerequisites diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index 7d0a67a0..f5cf8666 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. From dc3950f6376f1ee5c747f062afd43a654305884c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 06:35:33 -0600 Subject: [PATCH 13/51] Update xunit Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 0747b92b..8d1ed787 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,8 +10,8 @@ - - + + From 04843ad0057ceac68bf1f13f7aa20a76c671382e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 17 Aug 2025 12:34:52 -0600 Subject: [PATCH 14/51] Update actions/checkout action to v5 --- .github/workflows/docs_validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 35921d06..7c50b3b7 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -13,7 +13,7 @@ jobs: name: ๐Ÿ“š Doc validation runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: ๐Ÿ”— Markup Link Checker (mlc) From 90069e4bf80cd5a8d42ad6f46cb2827f8105f472 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 18:31:41 -0600 Subject: [PATCH 15/51] Update mcr.microsoft.com/dotnet/sdk:9.0.304-noble Docker digest to 0b7186a (#404) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 792d7e86..d40ad5e9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:1f7ccf88e076bc1cb1ddbd81959fb55b886b01851b092867bb7a638435fa1f1f +FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:0b7186a7247bf8c07085fd700613bb0425a6f8f6467a0342c12a535e767da803 # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From 640b1d12eb5de5bc1b02a42528206ef6a3155b27 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:13:42 -0600 Subject: [PATCH 16/51] Update actions/upload-pages-artifact action to v4 (#405) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6454d3c5..13751a64 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,7 +35,7 @@ jobs: name: ๐Ÿ“š Generate documentation - name: Upload artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4 with: path: docfx/_site From 6e77b794a0a615053d494cee596232f80d35c8bb Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 25 Aug 2025 16:44:44 -0600 Subject: [PATCH 17/51] Move GitHub workflow token permissions to per-job --- .github/workflows/docs.yml | 13 ++++++------- .github/workflows/release.yml | 7 +++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 13751a64..a7155c4c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,13 +5,6 @@ on: branches: - main -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - actions: read - pages: write - id-token: write - contents: read - # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: @@ -20,6 +13,12 @@ concurrency: jobs: publish-docs: + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + actions: read + pages: write + id-token: write + contents: read environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05a8c8ff..1b4e25ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,13 +11,12 @@ on: run-name: ${{ github.ref_name }} -permissions: - actions: read - contents: write - jobs: release: runs-on: ubuntu-24.04 + permissions: + actions: read + contents: write steps: - name: โš™๏ธ Initialization shell: pwsh From 3c9a9faab9fc9417bef919c798979b7e5e9736d1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 28 Aug 2025 15:05:29 -0600 Subject: [PATCH 18/51] Move Install-NuGetPackage.ps1 to the tools folder --- init.ps1 | 2 +- {azure-pipelines => tools}/Install-NuGetPackage.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename {azure-pipelines => tools}/Install-NuGetPackage.ps1 (96%) diff --git a/init.ps1 b/init.ps1 index e8c2602e..8bb78ad8 100755 --- a/init.ps1 +++ b/init.ps1 @@ -126,7 +126,7 @@ try { } } - $InstallNuGetPkgScriptPath = "$PSScriptRoot\azure-pipelines\Install-NuGetPackage.ps1" + $InstallNuGetPkgScriptPath = "$PSScriptRoot\tools\Install-NuGetPackage.ps1" $nugetVerbosity = 'quiet' if ($Verbose) { $nugetVerbosity = 'normal' } $MicroBuildPackageSource = 'https://pkgs.dev.azure.com/devdiv/_packaging/MicroBuildToolset%40Local/nuget/v3/index.json' diff --git a/azure-pipelines/Install-NuGetPackage.ps1 b/tools/Install-NuGetPackage.ps1 similarity index 96% rename from azure-pipelines/Install-NuGetPackage.ps1 rename to tools/Install-NuGetPackage.ps1 index f1db577a..9afde055 100644 --- a/azure-pipelines/Install-NuGetPackage.ps1 +++ b/tools/Install-NuGetPackage.ps1 @@ -33,7 +33,7 @@ Param( [string]$Verbosity='normal' ) -$nugetPath = & "$PSScriptRoot\..\tools\Get-NuGetTool.ps1" +$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" try { Write-Verbose "Installing $PackageId..." From 53aebc939ed71b5805ac5ddc66261d4ff76a5814 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 5 Sep 2025 07:48:40 -0600 Subject: [PATCH 19/51] Update hyperlinks to learn.microsoft.com --- CONTRIBUTING.md | 2 +- README.md | 2 +- azurepipelines-coverage.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 990402db..7875bfc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ 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://docs.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-6 +[pwsh]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell ## Releases diff --git a/README.md b/README.md index f0b0f7d8..b0c1a00c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ * Follow the best and simplest patterns of build, pack and test with dotnet CLI. * Init script that installs prerequisites and auth helpers, supporting both non-elevation and elevation modes. -* Static analyzers: default [Code Analysis](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/overview) and [StyleCop](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) +* Static analyzers: default [Code Analysis](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview) and [StyleCop](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) * Read-only source tree (builds to top-level bin/obj folders) * Auto-versioning (via [Nerdbank.GitVersioning](https://github.com/dotnet/nerdbank.gitversioning)) * Builds with a "pinned" .NET SDK to ensure reproducible builds across machines and across time. diff --git a/azurepipelines-coverage.yml b/azurepipelines-coverage.yml index 0cd5dad3..e2dd1f50 100644 --- a/azurepipelines-coverage.yml +++ b/azurepipelines-coverage.yml @@ -1,4 +1,4 @@ -# https://learn.microsoft.com/azure/devops/pipelines/test/codecoverage-for-pullrequests?view=azure-devops +# https://learn.microsoft.com/azure/devops/pipelines/test/codecoverage-for-pullrequests coverage: status: comments: on # add comment to PRs reporting diff in coverage of modified files From 8cf1387a466f05a0c6e2f2fd94a9b4d12e6997fc Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 5 Sep 2025 07:48:40 -0600 Subject: [PATCH 20/51] Update hyperlinks to learn.microsoft.com --- SECURITY.md | 2 +- azure-pipelines/PostPRMessage.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 0dc4b6a7..29306956 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://learn.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. ## Reporting Security Issues diff --git a/azure-pipelines/PostPRMessage.ps1 b/azure-pipelines/PostPRMessage.ps1 index 4a2b7886..4075f392 100644 --- a/azure-pipelines/PostPRMessage.ps1 +++ b/azure-pipelines/PostPRMessage.ps1 @@ -8,7 +8,7 @@ param( $CommentState='Active' ) -# See https://docs.microsoft.com/en-us/dotnet/api/microsoft.teamfoundation.sourcecontrol.webapi.commentthreadstatus?view=azure-devops-dotnet +# See https://learn.microsoft.com/dotnet/api/microsoft.teamfoundation.sourcecontrol.webapi.commentthreadstatus if ($CommentState -eq 'Active') { $StatusCode = 1 } elseif ($CommentState -eq 'ByDesign') { @@ -38,7 +38,7 @@ $body = ConvertTo-Json @{ Write-Verbose "Posting JSON payload: `n$Body" # Post the message to the Pull Request -# https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20threads?view=azure-devops-rest-5.1 +# https://learn.microsoft.com/rest/api/azure/devops/git/pull-request-threads $url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/git/repositories/$($env:BUILD_REPOSITORY_NAME)/pullRequests/$($env:SYSTEM_PULLREQUEST_PULLREQUESTID)/threads?api-version=5.1" if ($PSCmdlet.ShouldProcess($url, 'Post comment via REST call')) { try { From 25e8285b3bcd77428682e1f6799ef85c65f30a2c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 7 Sep 2025 19:09:57 -0600 Subject: [PATCH 21/51] Remove stray backtick from CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7875bfc8..d48a0207 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,7 +88,7 @@ If Renovate is not creating pull requests when you expect it to, check that the ### Maintaining your repo based on this template The best way to keep your repo in sync with Library.Template's evolving features and best practices is to periodically merge the template into your repo: -` + ```ps1 git fetch git checkout origin/main From 4d2be894dbdb286fcab1cabbf43c3fedca1c270b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 7 Sep 2025 19:34:41 -0600 Subject: [PATCH 22/51] Add `Install-NuGetPackage.ps1` script This was previously only included in the `microbuild` branch. --- tools/Install-NuGetPackage.ps1 | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tools/Install-NuGetPackage.ps1 diff --git a/tools/Install-NuGetPackage.ps1 b/tools/Install-NuGetPackage.ps1 new file mode 100644 index 00000000..9afde055 --- /dev/null +++ b/tools/Install-NuGetPackage.ps1 @@ -0,0 +1,55 @@ +<# +.SYNOPSIS + Installs a NuGet package. +.PARAMETER PackageID + The Package ID to install. +.PARAMETER Version + The version of the package to install. If unspecified, the latest stable release is installed. +.PARAMETER Source + The package source feed to find the package to install from. +.PARAMETER PackagesDir + The directory to install the package to. By default, it uses the Packages folder at the root of the repo. +.PARAMETER ConfigFile + The nuget.config file to use. By default, it uses :/nuget.config. +.OUTPUTS + System.String. The path to the installed package. +#> +[CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Low')] +Param( + [Parameter(Position=1,Mandatory=$true)] + [string]$PackageId, + [Parameter()] + [string]$Version, + [Parameter()] + [string]$Source, + [Parameter()] + [switch]$Prerelease, + [Parameter()] + [string]$PackagesDir="$PSScriptRoot\..\packages", + [Parameter()] + [string]$ConfigFile="$PSScriptRoot\..\nuget.config", + [Parameter()] + [ValidateSet('Quiet','Normal','Detailed')] + [string]$Verbosity='normal' +) + +$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" + +try { + Write-Verbose "Installing $PackageId..." + $nugetArgs = "Install",$PackageId,"-OutputDirectory",$PackagesDir,'-ConfigFile',$ConfigFile + if ($Version) { $nugetArgs += "-Version",$Version } + if ($Source) { $nugetArgs += "-FallbackSource",$Source } + if ($Prerelease) { $nugetArgs += "-Prerelease" } + $nugetArgs += '-Verbosity',$Verbosity + + if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) { + $p = Start-Process $nugetPath $nugetArgs -NoNewWindow -Wait -PassThru + if ($null -ne $p.ExitCode -and $p.ExitCode -ne 0) { throw } + } + + # Provide the path to the installed package directory to our caller. + Write-Output (Get-ChildItem "$PackagesDir\$PackageId.*")[0].FullName +} finally { + Pop-Location +} From c29f9af53a720c0ceae90e70bf6dfb5c88a89e84 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 7 Sep 2025 19:53:41 -0600 Subject: [PATCH 23/51] Add switches to Install-NuGetPackage.ps1 --- tools/Install-NuGetPackage.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/Install-NuGetPackage.ps1 b/tools/Install-NuGetPackage.ps1 index 9afde055..c7a42a91 100644 --- a/tools/Install-NuGetPackage.ps1 +++ b/tools/Install-NuGetPackage.ps1 @@ -7,6 +7,12 @@ The version of the package to install. If unspecified, the latest stable release is installed. .PARAMETER Source The package source feed to find the package to install from. +.PARAMETER Prerelease + Include prerelease packages when searching for the latest version. +.PARAMETER ExcludeVersion + Installs the package without adding the version to the folder name. +.PARAMETER DirectDownload + Bypass the local cache when downloading packages. .PARAMETER PackagesDir The directory to install the package to. By default, it uses the Packages folder at the root of the repo. .PARAMETER ConfigFile @@ -25,6 +31,10 @@ Param( [Parameter()] [switch]$Prerelease, [Parameter()] + [switch]$ExcludeVersion, + [Parameter()] + [switch]$DirectDownload, + [Parameter()] [string]$PackagesDir="$PSScriptRoot\..\packages", [Parameter()] [string]$ConfigFile="$PSScriptRoot\..\nuget.config", @@ -41,6 +51,8 @@ try { if ($Version) { $nugetArgs += "-Version",$Version } if ($Source) { $nugetArgs += "-FallbackSource",$Source } if ($Prerelease) { $nugetArgs += "-Prerelease" } + if ($ExcludeVersion) { $nugetArgs += '-ExcludeVersion' } + if ($DirectDownload) { $nugetArgs += '-DirectDownload' } $nugetArgs += '-Verbosity',$Verbosity if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) { From fec70cfcda335d648706e2875f38893ded3c1db6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:53:41 -0600 Subject: [PATCH 24/51] Update Dockerfile and global.json updates to v9.0.305 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d40ad5e9..c1223a43 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.304-noble@sha256:0b7186a7247bf8c07085fd700613bb0425a6f8f6467a0342c12a535e767da803 +FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:66a9fb34b06fe16c8a656327d6dd765b38bcb60577ce9af4bf08c6c63ea98702 # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index aee1f8eb..6fea1e98 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.304", + "version": "9.0.305", "rollForward": "patch", "allowPrerelease": false } From d71cf6675486eb27a563d4f118b471d99ef9207c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 07:38:47 -0600 Subject: [PATCH 25/51] Update mcr.microsoft.com/dotnet/sdk:9.0.305-noble Docker digest to 802e64a (#407) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c1223a43..5526144c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:66a9fb34b06fe16c8a656327d6dd765b38bcb60577ce9af4bf08c6c63ea98702 +FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:802e64ab9e113bdfa5d476ae00c7b40ab5c42da1792731c41a47f43bc4e74bdb # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From 1367101102f299c993d337aef3c5a4628c277b3a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 10 Sep 2025 08:00:08 -0600 Subject: [PATCH 26/51] Drop extra `Pop-Location` from `Install-NuGetPackage.ps1` --- tools/Install-NuGetPackage.ps1 | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/tools/Install-NuGetPackage.ps1 b/tools/Install-NuGetPackage.ps1 index c7a42a91..3c11b0f6 100644 --- a/tools/Install-NuGetPackage.ps1 +++ b/tools/Install-NuGetPackage.ps1 @@ -45,23 +45,19 @@ Param( $nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" -try { - Write-Verbose "Installing $PackageId..." - $nugetArgs = "Install",$PackageId,"-OutputDirectory",$PackagesDir,'-ConfigFile',$ConfigFile - if ($Version) { $nugetArgs += "-Version",$Version } - if ($Source) { $nugetArgs += "-FallbackSource",$Source } - if ($Prerelease) { $nugetArgs += "-Prerelease" } - if ($ExcludeVersion) { $nugetArgs += '-ExcludeVersion' } - if ($DirectDownload) { $nugetArgs += '-DirectDownload' } - $nugetArgs += '-Verbosity',$Verbosity +Write-Verbose "Installing $PackageId..." +$nugetArgs = "Install",$PackageId,"-OutputDirectory",$PackagesDir,'-ConfigFile',$ConfigFile +if ($Version) { $nugetArgs += "-Version",$Version } +if ($Source) { $nugetArgs += "-FallbackSource",$Source } +if ($Prerelease) { $nugetArgs += "-Prerelease" } +if ($ExcludeVersion) { $nugetArgs += '-ExcludeVersion' } +if ($DirectDownload) { $nugetArgs += '-DirectDownload' } +$nugetArgs += '-Verbosity',$Verbosity - if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) { - $p = Start-Process $nugetPath $nugetArgs -NoNewWindow -Wait -PassThru - if ($null -ne $p.ExitCode -and $p.ExitCode -ne 0) { throw } - } - - # Provide the path to the installed package directory to our caller. - Write-Output (Get-ChildItem "$PackagesDir\$PackageId.*")[0].FullName -} finally { - Pop-Location +if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) { + $p = Start-Process $nugetPath $nugetArgs -NoNewWindow -Wait -PassThru + if ($null -ne $p.ExitCode -and $p.ExitCode -ne 0) { throw } } + +# Provide the path to the installed package directory to our caller. +Write-Output (Get-ChildItem "$PackagesDir\$PackageId.*")[0].FullName From e40d505268ea70ccd683ea7b5554307cb5cedcf6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:09:28 -0600 Subject: [PATCH 27/51] Update dependency powershell to v7.5.3 --- .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 79ad7dda..e2f24dc2 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.5.2", + "version": "7.5.3", "commands": [ "pwsh" ], From 761109a9d7112f25e0c880ff91958394cb3aecbf Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 10 Sep 2025 21:34:45 -0600 Subject: [PATCH 28/51] Add API compat testing --- .config/dotnet-tools.json | 7 ++++ .github/workflows/build.yml | 4 ++ azure-pipelines/build.yml | 4 ++ azure-pipelines/dotnet.yml | 11 +++++- tools/Check-ApiCompat.ps1 | 74 +++++++++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 tools/Check-ApiCompat.ps1 diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 79ad7dda..79ccf8bd 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -29,6 +29,13 @@ "docfx" ], "rollForward": false + }, + "microsoft.dotnet.apicompat.tool": { + "version": "9.0.305", + "commands": [ + "apicompat" + ], + "rollForward": false } } } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03067ad2..4e5f1b53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,10 @@ jobs: - name: ๐Ÿงช test run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} shell: pwsh + - name: ๐Ÿ“‹ API compat test + run: tools/Check-ApiCompat.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} + shell: pwsh + if: runner.os == 'Linux' - name: ๐Ÿ’…๐Ÿป Verify formatted code run: dotnet format --verify-no-changes --no-restore shell: pwsh diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 5c106ade..e3c59be8 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -8,6 +8,9 @@ parameters: - name: RunTests type: boolean default: true +- name: EnableApiCompatCheck + type: boolean + default: true jobs: - job: Windows @@ -37,6 +40,7 @@ jobs: - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} + EnableApiCompatCheck: ${{ parameters.EnableApiCompatCheck }} - script: dotnet format --verify-no-changes displayName: ๐Ÿ’… Verify formatted code env: diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 30bb4107..8630e50c 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -1,5 +1,9 @@ parameters: - RunTests: +- name: RunTests + type: boolean +- name: EnableApiCompatCheck + type: boolean + default: false steps: @@ -10,6 +14,11 @@ steps: displayName: ๐Ÿงช dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) +- ${{ if parameters.EnableApiCompatCheck }}: + - powershell: tools/Check-ApiCompat.ps1 -Configuration $(BuildConfiguration) + displayName: ๐Ÿ“‹ API compat test + condition: and(succeeded(), ${{ parameters.RunTests }}) + - powershell: tools/variables/_define.ps1 failOnStderr: true displayName: โš™ Update pipeline variables based on build outputs diff --git a/tools/Check-ApiCompat.ps1 b/tools/Check-ApiCompat.ps1 new file mode 100644 index 00000000..26dd6d4c --- /dev/null +++ b/tools/Check-ApiCompat.ps1 @@ -0,0 +1,74 @@ +#!/usr/bin/env pwsh + +<# +.SYNOPSIS + Runs the apicompat tool on the built packages. +.PARAMETER Configuration + Debug or Release +.PARAMETER GenerateSuppressionFile + If specified, generates or updates a suppression file for API compatibility checks. +#> +[CmdletBinding()] +Param ( + [string]$Configuration = 'Release', + [switch]$GenerateSuppressionFile +) + +Function Get-PackageId($nupkgPath) { + # The package ID cannot be reliably parsed out of the nupkg file name, + # because if the ID ends with an integer, it may be ambiguous with the version part. + # Extract the nuspec file from the nupkg to get the package ID. + $tempDir = [System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString() + New-Item -ItemType Directory -Path $tempDir | Out-Null + try { + Expand-Archive -Path $nupkgPath -DestinationPath $tempDir + $nuspecPath = Get-ChildItem -Path $tempDir -Filter "*.nuspec" | Select-Object -First 1 + if ($nuspecPath) { + [xml]$nuspec = Get-Content $nuspecPath.FullName + return $nuspec.package.metadata.id + } + else { + Write-Warning "No nuspec found in $nupkgPath" + return $null + } + } + finally { + Remove-Item -Recurse -Force $tempDir + } +} + +$failures = 0 +Get-ChildItem $PSScriptRoot/../bin/Packages/$Configuration/*.nupkg | % { + $packageId = Get-PackageId $_.FullName + + if ($packageId -eq $null) { + continue + } + + $compatArgs = 'apicompat', 'package', $_.FullName, '--enable-strict-mode-for-baseline-validation' + + # Attempt to download the last published stable version of this package + # to serve as a baseline on which this new build should be API compatible. + try { + New-Item -ItemType Directory -Path "$PSScriptRoot/../obj" -Force | Out-Null + $baselineFile = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/$packageId.baseline.nupkg") + Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/$packageId -OutFile $baselineFile + $compatArgs += '--baseline-package', $baselineFile + } + catch { + Write-Warning "Failed to download baseline package for $packageId, which may be expected if a stable package has not been published. $_" + } + + $ApiCompatSuppressionPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../src/$packageId/ApiCompatSuppressions.xml") + if ((Test-Path $ApiCompatSuppressionPath) -or $GenerateSuppressionFile) { + $compatArgs += '--suppression-file', $ApiCompatSuppressionPath + } + if ($GenerateSuppressionFile) { + $compatArgs += '--generate-suppression-file' + } + Write-Host "Testing $($packageId): dotnet $compatArgs" + dotnet @compatArgs + if ($LASTEXITCODE -ne 0) { $failures += 1 } +} + +exit $failures From b1997987d1afcb5b8b544aff70e8efcbd131569e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 10 Sep 2025 21:54:22 -0600 Subject: [PATCH 29/51] Switch API compat testing from dotnet tool to MSBuild --- .config/dotnet-tools.json | 7 ---- .github/workflows/build.yml | 4 -- Directory.Build.props | 3 ++ azure-pipelines/build.yml | 4 -- azure-pipelines/dotnet.yml | 11 +----- src/Library/Library.csproj | 1 + tools/Check-ApiCompat.ps1 | 74 ------------------------------------- 7 files changed, 5 insertions(+), 99 deletions(-) delete mode 100644 tools/Check-ApiCompat.ps1 diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 79ccf8bd..79ad7dda 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -29,13 +29,6 @@ "docfx" ], "rollForward": false - }, - "microsoft.dotnet.apicompat.tool": { - "version": "9.0.305", - "commands": [ - "apicompat" - ], - "rollForward": false } } } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e5f1b53..03067ad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,10 +50,6 @@ jobs: - name: ๐Ÿงช test run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} shell: pwsh - - name: ๐Ÿ“‹ API compat test - run: tools/Check-ApiCompat.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} - shell: pwsh - if: runner.os == 'Linux' - name: ๐Ÿ’…๐Ÿป Verify formatted code run: dotnet format --verify-no-changes --no-restore shell: pwsh diff --git a/Directory.Build.props b/Directory.Build.props index f702243a..02d41804 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,6 +13,9 @@ true true + + true + true diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index e3c59be8..5c106ade 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -8,9 +8,6 @@ parameters: - name: RunTests type: boolean default: true -- name: EnableApiCompatCheck - type: boolean - default: true jobs: - job: Windows @@ -40,7 +37,6 @@ jobs: - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} - EnableApiCompatCheck: ${{ parameters.EnableApiCompatCheck }} - script: dotnet format --verify-no-changes displayName: ๐Ÿ’… Verify formatted code env: diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 8630e50c..30bb4107 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -1,9 +1,5 @@ parameters: -- name: RunTests - type: boolean -- name: EnableApiCompatCheck - type: boolean - default: false + RunTests: steps: @@ -14,11 +10,6 @@ steps: displayName: ๐Ÿงช dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) -- ${{ if parameters.EnableApiCompatCheck }}: - - powershell: tools/Check-ApiCompat.ps1 -Configuration $(BuildConfiguration) - displayName: ๐Ÿ“‹ API compat test - condition: and(succeeded(), ${{ parameters.RunTests }}) - - powershell: tools/variables/_define.ps1 failOnStderr: true displayName: โš™ Update pipeline variables based on build outputs diff --git a/src/Library/Library.csproj b/src/Library/Library.csproj index 89f06234..fa79c05e 100644 --- a/src/Library/Library.csproj +++ b/src/Library/Library.csproj @@ -1,5 +1,6 @@ net8.0;netstandard2.0 + diff --git a/tools/Check-ApiCompat.ps1 b/tools/Check-ApiCompat.ps1 deleted file mode 100644 index 26dd6d4c..00000000 --- a/tools/Check-ApiCompat.ps1 +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - Runs the apicompat tool on the built packages. -.PARAMETER Configuration - Debug or Release -.PARAMETER GenerateSuppressionFile - If specified, generates or updates a suppression file for API compatibility checks. -#> -[CmdletBinding()] -Param ( - [string]$Configuration = 'Release', - [switch]$GenerateSuppressionFile -) - -Function Get-PackageId($nupkgPath) { - # The package ID cannot be reliably parsed out of the nupkg file name, - # because if the ID ends with an integer, it may be ambiguous with the version part. - # Extract the nuspec file from the nupkg to get the package ID. - $tempDir = [System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString() - New-Item -ItemType Directory -Path $tempDir | Out-Null - try { - Expand-Archive -Path $nupkgPath -DestinationPath $tempDir - $nuspecPath = Get-ChildItem -Path $tempDir -Filter "*.nuspec" | Select-Object -First 1 - if ($nuspecPath) { - [xml]$nuspec = Get-Content $nuspecPath.FullName - return $nuspec.package.metadata.id - } - else { - Write-Warning "No nuspec found in $nupkgPath" - return $null - } - } - finally { - Remove-Item -Recurse -Force $tempDir - } -} - -$failures = 0 -Get-ChildItem $PSScriptRoot/../bin/Packages/$Configuration/*.nupkg | % { - $packageId = Get-PackageId $_.FullName - - if ($packageId -eq $null) { - continue - } - - $compatArgs = 'apicompat', 'package', $_.FullName, '--enable-strict-mode-for-baseline-validation' - - # Attempt to download the last published stable version of this package - # to serve as a baseline on which this new build should be API compatible. - try { - New-Item -ItemType Directory -Path "$PSScriptRoot/../obj" -Force | Out-Null - $baselineFile = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/$packageId.baseline.nupkg") - Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/$packageId -OutFile $baselineFile - $compatArgs += '--baseline-package', $baselineFile - } - catch { - Write-Warning "Failed to download baseline package for $packageId, which may be expected if a stable package has not been published. $_" - } - - $ApiCompatSuppressionPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../src/$packageId/ApiCompatSuppressions.xml") - if ((Test-Path $ApiCompatSuppressionPath) -or $GenerateSuppressionFile) { - $compatArgs += '--suppression-file', $ApiCompatSuppressionPath - } - if ($GenerateSuppressionFile) { - $compatArgs += '--generate-suppression-file' - } - Write-Host "Testing $($packageId): dotnet $compatArgs" - dotnet @compatArgs - if ($LASTEXITCODE -ne 0) { $failures += 1 } -} - -exit $failures From dfa8f358b1f8bdf4546fe2023e3145e884ad92c2 Mon Sep 17 00:00:00 2001 From: trevors20 <49179298+trevors20@users.noreply.github.com> Date: Thu, 11 Sep 2025 08:20:54 -0700 Subject: [PATCH 30/51] Migrate from managed identity to service connection for APIScan (#409) * Migrate from managed identity to service connection for APIScan. * Add the system access token. * Use a variable for the apiscan auth string. * Apply suggestion from @AArnott --------- Co-authored-by: Andrew Arnott --- azure-pipelines/apiscan.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines/apiscan.yml b/azure-pipelines/apiscan.yml index c3c8aed1..a1d07e10 100644 --- a/azure-pipelines/apiscan.yml +++ b/azure-pipelines/apiscan.yml @@ -49,8 +49,10 @@ jobs: isLargeApp: false toolVersion: Latest preserveLogsFolder: true + azureSubscription: VSEng-APIScanSC env: - AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId) + AzureServicesAuthConnectionString: $(APIScanAuthConnectionString) + SYSTEM_ACCESSTOKEN: $(System.AccessToken) # File bugs when APIScan finds issues - task: TSAUpload@2 From 28cf28e93868cf212cafc84b8c2d032624b453f6 Mon Sep 17 00:00:00 2001 From: Matteo Prosperi <41970398+matteo-prosperi@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:29:45 -0700 Subject: [PATCH 31/51] Migrate from managed identity to service connection for symbol archiving (#411) * Migrate from managed identity to service connection for symbol archiving Updated MicroBuildArchiveSymbols task version and added Azure subscription and environment variables. * Apply suggestion from @AArnott --------- Co-authored-by: Andrew Arnott --- azure-pipelines/prepare-insertion-stages.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines/prepare-insertion-stages.yml b/azure-pipelines/prepare-insertion-stages.yml index cfe28743..fdce906a 100644 --- a/azure-pipelines/prepare-insertion-stages.yml +++ b/azure-pipelines/prepare-insertion-stages.yml @@ -30,12 +30,15 @@ stages: - download: current artifact: symbols-legacy displayName: ๐Ÿ”ป Download symbols-legacy artifact - - task: MicroBuildArchiveSymbols@5 + - task: MicroBuildArchiveSymbols@6 displayName: ๐Ÿ”ฃ Archive symbols to Symweb inputs: SymbolsFeatureName: $(SymbolsFeatureName) SymbolsProject: VS SymbolsAgentPath: $(Pipeline.Workspace)/symbols-legacy + azureSubscription: Vseng-SymbolsUpload + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - ${{ if parameters.PackagePush }}: - job: push From 028c074776bd658a8594370571b80484d435e05b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 12:49:52 -0600 Subject: [PATCH 32/51] Bump MicroBuild version to 2.0.201 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 80e687a5..73c69a87 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true true - 2.0.199 + 2.0.201 From ce5bb3c2a4163c2010d7eab775a59257eaaf30b5 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 12:50:00 -0600 Subject: [PATCH 33/51] Update .gitignore source URL --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cc2b1247..1b779930 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore # User-specific files *.rsuser From 60bc0ad038dfd438997fc034bf89c3be53254337 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 12:50:15 -0600 Subject: [PATCH 34/51] Drop explicit nuget.org source for procdump It'll now come from wherever nuget.config says. --- tools/Get-ProcDump.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Get-ProcDump.ps1 b/tools/Get-ProcDump.ps1 index 1493fe4b..6fba954d 100644 --- a/tools/Get-ProcDump.ps1 +++ b/tools/Get-ProcDump.ps1 @@ -8,7 +8,7 @@ $procDumpToolPath = "$baseDir\procdump.$version\bin" if (-not (Test-Path $procDumpToolPath)) { if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null } $baseDir = (Resolve-Path $baseDir).Path # Normalize it - & (& $PSScriptRoot\Get-NuGetTool.ps1) install procdump -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://api.nuget.org/v3/index.json | Out-Null + & (& $PSScriptRoot\Get-NuGetTool.ps1) install procdump -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir | Out-Null } (Resolve-Path $procDumpToolPath).Path From 0f75208c0de471105bfbea7355590f69f05e96a9 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 16:51:08 -0600 Subject: [PATCH 35/51] Allow VSInsertion artifact collection with just a VSIX --- tools/artifacts/VSInsertion.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/artifacts/VSInsertion.ps1 b/tools/artifacts/VSInsertion.ps1 index ffc7e29a..a5b940b5 100644 --- a/tools/artifacts/VSInsertion.ps1 +++ b/tools/artifacts/VSInsertion.ps1 @@ -20,8 +20,8 @@ $PackagesRoot = "$RepoRoot/bin/Packages/$BuildConfiguration" $NuGetPackages = "$PackagesRoot/NuGet" $VsixPackages = "$PackagesRoot/Vsix" -if (!(Test-Path $NuGetPackages)) { - Write-Warning "Skipping because NuGet packages haven't been built yet." +if (!(Test-Path $NuGetPackages) -and !(Test-Path $VsixPackages)) { + Write-Warning "Skipping because NuGet and VSIX packages haven't been built yet." return @{} } From 0e1fe345c4406ad40c16b6304543cd5f12a9c244 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 17:49:26 -0600 Subject: [PATCH 36/51] Fix Microsoft.DiaSymReader.Pdb2Pdb package installation --- tools/Convert-PDB.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/Convert-PDB.ps1 b/tools/Convert-PDB.ps1 index f119a164..7e1303a2 100644 --- a/tools/Convert-PDB.ps1 +++ b/tools/Convert-PDB.ps1 @@ -30,7 +30,13 @@ if (-not (Test-Path $pdb2pdbpath)) { if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null } $baseDir = (Resolve-Path $baseDir).Path # Normalize it Write-Verbose "& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null" - & (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null + # This package originally comes from the https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json feed. + # Add this feed as an upstream to whatever feed is in nuget.config if this step fails. + & (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir | Out-Null + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to install Microsoft.DiaSymReader.Pdb2Pdb. Consider adding https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json as an upstream to your nuget.config feed." + return + } } $args = $DllPath,'/out',$OutputPath,'/nowarn','0021' From fe66868c9e853165c57920a79d2ef8ae160d884b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 17 Sep 2025 21:00:27 -0600 Subject: [PATCH 37/51] Fix VSIX placement to match .vsman expectations --- Directory.Build.props | 1 + 1 file changed, 1 insertion(+) diff --git a/Directory.Build.props b/Directory.Build.props index b3a76d98..53754def 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,6 +7,7 @@ $(RepoRootPath)bin\$(MSBuildProjectName)\ $(RepoRootPath)bin\Packages\$(Configuration)\NuGet\ $(RepoRootPath)bin\Packages\$(Configuration)\Vsix\$(Platform)\ + $(RepoRootPath)bin\Packages\$(Configuration)\Vsix\ $(VSIXOutputPath) enable enable From af11e1164b6ce85ca3599741d7830c6b8cab1d17 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 18 Sep 2025 07:31:58 -0600 Subject: [PATCH 38/51] Fix stray period in doc --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d48a0207..d4322a7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ Trigger the pipeline by adding the `auto-release` tag on a run of your main `azu ## Tutorial and API documentation -API and hand-written docs are found under the `docfx/` directory. and are built by [docfx](https://dotnet.github.io/docfx/). +API and hand-written docs are found under the `docfx/` directory and are built by [docfx](https://dotnet.github.io/docfx/). You can make changes and host the site locally to preview them by switching to that directory and running the `dotnet docfx --serve` command. After making a change, you can rebuild the docs site while the localhost server is running by running `dotnet docfx` again from a separate terminal. From b9362532b8ef8db8a88a0eec99fbcca3329fea57 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 18 Sep 2025 16:44:33 -0600 Subject: [PATCH 39/51] Use newer SBOM tool The old one has concurrency bugs that leads to frequent build breaks. --- azure-pipelines/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index e91da614..3db1adde 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -123,6 +123,7 @@ jobs: signType: test sbom: enabled: true + sbomToolVersion: 5.0.3 localization: enabled: ${{ parameters.EnableLocalization }} ${{ if eq(variables['Build.Reason'], 'pullRequest') }}: From 85815caf5391c3f73790b62bea08a652ccb6edff Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 19 Sep 2025 11:38:24 -0600 Subject: [PATCH 40/51] Bump nuget.exe to 6.14.0 --- tools/Get-NuGetTool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Get-NuGetTool.ps1 b/tools/Get-NuGetTool.ps1 index 8a3b9eed..bed0cba1 100644 --- a/tools/Get-NuGetTool.ps1 +++ b/tools/Get-NuGetTool.ps1 @@ -6,7 +6,7 @@ #> Param( [Parameter()] - [string]$NuGetVersion='6.12.2' + [string]$NuGetVersion='6.14.0' ) $toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" From 7bfb1d6e3808df638ff45910153e6607f3146b64 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 08:47:15 -0600 Subject: [PATCH 41/51] Update mcr.microsoft.com/dotnet/sdk:9.0.305-noble Docker digest to 604ef06 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5526144c..4a440efc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:802e64ab9e113bdfa5d476ae00c7b40ab5c42da1792731c41a47f43bc4e74bdb +FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:604ef064c6d91068eeb9d946036d8ffadbe25589c4cd77a230fc96e0f6d01d72 # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From 0ec755fcdfd442bfa287aa8ecf070a01154e2b6d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 26 Sep 2025 10:51:48 -0600 Subject: [PATCH 42/51] Don't check npmjs.com doc links npmjs.com has taken to blocking such checks with 403 Forbidden. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03067ad2..ee6caf65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,4 +78,4 @@ jobs: - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0 with: - args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://www.npmjs.com/package/* From 04923ff12b0d3eb17a680b41e4fa1485b21b8471 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 26 Sep 2025 11:16:50 -0600 Subject: [PATCH 43/51] Add dotnet-tools.json to Solution Items --- Library.sln | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library.sln b/Library.sln index 638efb56..5c81b306 100644 --- a/Library.sln +++ b/Library.sln @@ -1,7 +1,7 @@ ๏ปฟ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29322.22 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.11023.372 main MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library", "src\Library\Library.csproj", "{C06D702E-6FC7-453B-BDDF-608F825EC003}" EndProject @@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets Directory.Packages.props = Directory.Packages.props + .config\dotnet-tools.json = .config\dotnet-tools.json global.json = global.json nuget.config = nuget.config README.md = README.md From 0b8462ee3ccc5c91c1a44fba2453d9ac8833d603 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 26 Sep 2025 11:42:17 -0600 Subject: [PATCH 44/51] Skip testing get.dot.net links This link is good, but github agents get a 403 Forbidden back --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee6caf65..717342eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,4 +78,4 @@ jobs: - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0 with: - args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://www.npmjs.com/package/* + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://www.npmjs.com/package/*,https://get.dot.net/ From a0fe97a199d47a23beedea8e15eaaa3360d9ea09 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:48:55 +0000 Subject: [PATCH 45/51] Update nbgv and nerdbank.gitversioning updates to 3.8.118 (#416) Co-authored-by: renovate[bot] <29139614+renovate[bot]@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 e2f24dc2..bdb0ed42 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "nbgv": { - "version": "3.7.115", + "version": "3.8.118", "commands": [ "nbgv" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index 8d1ed787..8cbe694c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,7 +20,7 @@ - + From 234e34d4def6efd24740488c3cab887dc5a1793b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 27 Sep 2025 14:56:47 -0600 Subject: [PATCH 46/51] Switch to NuGet Trusted Publishing --- .github/workflows/release.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b4e25ca..b84d9077 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,17 +15,10 @@ jobs: release: runs-on: ubuntu-24.04 permissions: - actions: read - contents: write + actions: read # Required to download artifacts + contents: write # Upload artifacts to Release + id-token: write # Required for NuGet CLI Login steps: - - name: โš™๏ธ Initialization - shell: pwsh - run: | - if ('${{ secrets.NUGET_API_KEY }}') { - Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed." - echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV - } - - name: ๐Ÿ”Ž Search for build of ${{ github.ref }} shell: pwsh id: findrunid @@ -82,6 +75,11 @@ jobs: gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName } + - name: ๐Ÿชช Authorize NuGet package push + uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1 + id: nuget-login + with: + user: ${{ secrets.NUGET_USER }} + - name: ๐Ÿš€ Push NuGet packages - run: dotnet nuget push ${{ runner.temp }}/deployables/*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}' - if: ${{ env.NUGET_API_KEY_DEFINED == 'true' }} + run: dotnet nuget push ${{ runner.temp }}/deployables/*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ steps.nuget-login.outputs.NUGET_API_KEY }}' From e574cb5e19a217eeebf29b71a572c153fefbb855 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 27 Sep 2025 21:04:27 -0600 Subject: [PATCH 47/51] Update xunit (#417) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8cbe694c..aa5788c4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,8 +10,8 @@ - - + + From 8712b0e13085e2603f6bb3d61f644395b5b2e268 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 06:41:55 -0700 Subject: [PATCH 48/51] Update dependency dotnet-coverage to v18 (#419) 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 bdb0ed42..f8c4a264 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "17.14.2", + "version": "18.0.4", "commands": [ "dotnet-coverage" ], From 11ec88f1d866e5c246e3a91690d1adfaf9227ad8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 02:21:26 +0000 Subject: [PATCH 49/51] Update mcr.microsoft.com/dotnet/sdk:9.0.305-noble Docker digest to 8a26226 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4a440efc..2c0bd561 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:604ef064c6d91068eeb9d946036d8ffadbe25589c4cd77a230fc96e0f6d01d72 +FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:8a26226e58ec52c5defb37b876584df99f94bec70f1081c4014fdf25c994d51e # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From 86903f81179e9d6649b834eb619075b9dbbec4ba Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 1 Oct 2025 09:13:20 -0700 Subject: [PATCH 50/51] Drop devcontainer folder from microbuild repos The pinned Docker image changes too frequently, causing high severity security alerts, and we don't even hardly use this file. --- .devcontainer/Dockerfile | 14 -------------- .devcontainer/devcontainer.json | 25 ------------------------- 2 files changed, 39 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 2c0bd561..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:8a26226e58ec52c5defb37b876584df99f94bec70f1081c4014fdf25c994d51e - -# Installing mono makes `dotnet test` work without errors even for net472. -# But installing it takes a long time, so it's excluded by default. -#RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF -#RUN echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee /etc/apt/sources.list.d/mono-official-stable.list -#RUN apt-get update -#RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mono-devel - -# Clear the NUGET_XMLDOC_MODE env var so xml api doc files get unpacked, allowing a rich experience in Intellisense. -# See https://github.com/dotnet/dotnet-docker/issues/2790 for a discussion on this, where the prioritized use case -# was *not* devcontainers, sadly. -ENV NUGET_XMLDOC_MODE= diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 1a3a0086..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Dev space", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - "terminal.integrated.shell.linux": "/usr/bin/pwsh" - }, - "extensions": [ - "ms-azure-devops.azure-pipelines", - "ms-dotnettools.csharp", - "k--kato.docomment", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "pflannery.vscode-versionlens", - "davidanson.vscode-markdownlint", - "dotjoshjohnson.xml", - "ms-vscode-remote.remote-containers", - "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools" - ] - } - }, - "postCreateCommand": "./init.ps1 -InstallLocality machine" -} From 717ca56a8ad4dfb63818eafc4eb904cdbc4b2756 Mon Sep 17 00:00:00 2001 From: Ryan Toth Date: Mon, 6 Oct 2025 17:19:24 -0700 Subject: [PATCH 51/51] Update xunit --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 6513e9af..4d72eab2 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -19,8 +19,8 @@ - - + +