From 2678ec5fa3e3d854140405cd980f241df8da617e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 28 Sep 2022 08:39:19 -0600 Subject: [PATCH 01/69] Use static graph restore It's faster, and the future. --- Directory.Build.props | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index f13158c00..3170d14b1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,6 +16,9 @@ true + + true + $(MSBuildThisFileDirectory) From 0552ddca8b22548fe1e331a64ebe430fe6a80008 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 30 Sep 2022 22:48:21 -0600 Subject: [PATCH 02/69] Update dependencies --- Directory.Build.props | 2 +- test/Library.Tests/Library.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 3170d14b1..8cada6c76 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,7 +40,7 @@ - + diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index 2c1c3e8e5..4e9a7a4c4 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -10,7 +10,7 @@ - + From 2eaf0fb8f261f978f6d60bef5fde8c87d5eb8640 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 5 Oct 2022 11:48:02 -0600 Subject: [PATCH 03/69] Update .NET SDK to 6.0.401 --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b13ca0aca..5c1bdc7ab 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0.300-focal +FROM mcr.microsoft.com/dotnet/sdk:6.0.401-focal # 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 954a92e75..7bf6fc99a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.300", + "version": "6.0.401", "rollForward": "patch", "allowPrerelease": false } From abab1d849933ee85cb6f026026f28e481db1bc64 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 20 Oct 2022 16:06:44 -0600 Subject: [PATCH 04/69] Fix variable detection on linux Linux can have empty values for environment variables. Windows evidently doesn't tend to have those. --- azure-pipelines/variables/_pipelines.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/variables/_pipelines.ps1 index 951106d2d..11748b81b 100644 --- a/azure-pipelines/variables/_pipelines.ps1 +++ b/azure-pipelines/variables/_pipelines.ps1 @@ -14,7 +14,7 @@ param ( (& "$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() - if (Test-Path -Path "env:$keyCaps") { + if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) { Write-Host "Skipping setting $keyCaps because variable is already set to '$(Get-Content env:$keyCaps)'." -ForegroundColor Cyan } else { Write-Host "$keyCaps=$($_.Value)" -ForegroundColor Yellow From cffffa4afb7b44d45896d8138d6464bc92650fbe Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 24 Oct 2022 14:17:43 -0600 Subject: [PATCH 05/69] Update Nerdbank.GitVersioning version --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8cada6c76..abdb9d8b1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,7 +40,7 @@ - + From 2a5a528133ac007b2facba8b53cfbdb86f0f0b67 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 31 Oct 2022 08:51:51 -0600 Subject: [PATCH 06/69] Improve verbose output of artifact collection --- azure-pipelines/artifacts/_all.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/artifacts/_all.ps1 b/azure-pipelines/artifacts/_all.ps1 index 033cc87c9..9a22a1d08 100755 --- a/azure-pipelines/artifacts/_all.ps1 +++ b/azure-pipelines/artifacts/_all.ps1 @@ -38,6 +38,7 @@ Get-ChildItem "$PSScriptRoot\*.ps1" -Exclude "_*" -Recurse | % { $ArtifactName = $_.BaseName if ($Force -or !(Test-ArtifactStaged($ArtifactName + $ArtifactNameSuffix))) { $totalFileCount = 0 + Write-Verbose "Collecting file list for artifact $($_.BaseName)" $fileGroups = & $_ if ($fileGroups) { $fileGroups.GetEnumerator() | % { From 77fcd3de2d9f7c6368cc0baeb6cf6e23a204bdaa Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 08:16:02 -0600 Subject: [PATCH 07/69] Switch to NuGet's central package versioning --- Directory.Build.props | 13 ++++++------- Directory.Packages.props | 17 +++++++++++++++++ test/Library.Tests/Library.Tests.csproj | 6 +++--- 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index abdb9d8b1..8f186a7c7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -39,13 +39,12 @@ - - - - - - - + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 000000000..8bec0397a --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,17 @@ + + + + true + + + + + + + + + + + + + diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index 4e9a7a4c4..39650b7d7 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + From b894b8a9901dfcbec1030860da30bf6c7507bd19 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 08:22:12 -0600 Subject: [PATCH 08/69] Update to the .NET 7.0.100-rc.2 SDK This removes the warning about using NuGet CPVM, "a preview feature". --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 7bf6fc99a..01e689ed8 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.401", + "version": "7.0.100-rc.2.22477.23", "rollForward": "patch", "allowPrerelease": false } From ab4fb10d210dd404d8d04aa14c706af271129d0e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 08:29:15 -0600 Subject: [PATCH 09/69] Switch to using GlobalPackageReference --- Directory.Build.props | 9 --------- Directory.Packages.props | 14 ++++++++------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8f186a7c7..301047d1e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -38,15 +38,6 @@ snupkg - - - - - - - - - diff --git a/Directory.Packages.props b/Directory.Packages.props index 8bec0397a..2b94d74d9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,14 +4,16 @@ true - - - - - - + + + + + + + + From 318aaadd6dc4f2b674e5f7c18e9940550a1b3e43 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 08:45:31 -0600 Subject: [PATCH 10/69] Move GitHub-specific package ref to its own group This is to reduce merge conflicts with the microbuild branch where nearby lines change a lot. --- Directory.Packages.props | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 2b94d74d9..c33a3beb0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,9 +11,11 @@ - + + + From 253e62c08488d57a5b740fb68475501353713cdd Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 12:02:25 -0600 Subject: [PATCH 11/69] Simplify parent import pattern --- src/Directory.Build.props | 2 +- src/Directory.Build.targets | 2 +- test/Directory.Build.props | 2 +- test/Directory.Build.targets | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 77d947658..052fe3ef0 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,3 +1,3 @@ - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 566ab4fcf..c1d929a5b 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -3,5 +3,5 @@ - + diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 449a06e45..ad4a4b6c5 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -1,5 +1,5 @@ - + false diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index e7edee55a..052fe3ef0 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -1,3 +1,3 @@ - + From f91a0e871d9f794cc36020341f358718d6b07f83 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 4 Nov 2022 14:19:46 -0600 Subject: [PATCH 12/69] Avoid .NET 7 SDK till it's stable Otherwise, msbuild.exe fails on VS 17.3, which is the latest stable release. We need to wait till folks can use VS 17.4 to use the .NET 7 SDK. --- Directory.Packages.props | 24 ++++++++++++++++++------ global.json | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c33a3beb0..8c1e8f80a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,14 +8,26 @@ + - - - - - + + + + + - + + + + + + + + + + + diff --git a/global.json b/global.json index 01e689ed8..3ce46e096 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.100-rc.2.22477.23", + "version": "6.0.402", "rollForward": "patch", "allowPrerelease": false } From c32551d1365873cdf6c26bec81c07481fa2b28fe Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 7 Nov 2022 08:59:40 -0700 Subject: [PATCH 13/69] Add Directory.Packages.props as a solution item --- Library.sln | 1 + 1 file changed, 1 insertion(+) diff --git a/Library.sln b/Library.sln index 606811aaf..638efb568 100644 --- a/Library.sln +++ b/Library.sln @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets + Directory.Packages.props = Directory.Packages.props global.json = global.json nuget.config = nuget.config README.md = README.md From 295d06694b9fd0993197bb6c1ea94731c2b4bb05 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 10 Nov 2022 17:26:57 +0000 Subject: [PATCH 14/69] Use static code coverage preview This is in an attempt to fix #180 --- Directory.Packages.props | 1 + azure-pipelines/test.runsettings | 6 ++++-- nuget.config | 1 + test/Library.Tests/Library.Tests.csproj | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8c1e8f80a..d12266917 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,6 +4,7 @@ true + diff --git a/azure-pipelines/test.runsettings b/azure-pipelines/test.runsettings index c69022fc0..975b71233 100644 --- a/azure-pipelines/test.runsettings +++ b/azure-pipelines/test.runsettings @@ -31,11 +31,13 @@ False - True + False - True + False True + True + False diff --git a/nuget.config b/nuget.config index 22f7b8098..9454ec025 100644 --- a/nuget.config +++ b/nuget.config @@ -7,6 +7,7 @@ + diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index 39650b7d7..2eb4afe1e 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -10,6 +10,7 @@ + From ad6e2422bed202dfd0e95a567635809eb9b3a2f3 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 11 Nov 2022 15:19:51 +0000 Subject: [PATCH 15/69] Resolve NU1507 warning --- nuget.config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nuget.config b/nuget.config index 9454ec025..6ce7cfd05 100644 --- a/nuget.config +++ b/nuget.config @@ -13,4 +13,12 @@ + + + + + + + + From 66a302c4e7c60633ad09c232f0b8cd105ab1f795 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 14 Nov 2022 12:17:50 -0700 Subject: [PATCH 16/69] Update Microsoft.NET.Test.Sdk --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d12266917..924f4b4e0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ - + @@ -31,4 +31,4 @@ - + \ No newline at end of file From 8ebf3f27b25adbe6d266bc07fbdd01bc94d82a48 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 21 Nov 2022 09:37:48 -0700 Subject: [PATCH 17/69] Use `MSBuildTreatWarningsAsErrors` in pipeline This is more comprehensive than `TreatWarningsAsErrors` because it changes the behavior of the MSBuild logging system itself instead of relying on individual tasks and targets to honor the property and elevate their own warnings. --- .github/workflows/build.yml | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c4ba94c6..a56a6dda2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: pull_request: env: - TreatWarningsAsErrors: true + MSBuildTreatWarningsAsErrors: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true BUILDCONFIGURATION: Release # codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2cac17bd9..521d4ce6b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,7 +23,7 @@ parameters: default: true variables: - TreatWarningsAsErrors: true + MSBuildTreatWarningsAsErrors: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true BuildConfiguration: Release codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/ From 73ef446ccb46cf39b434ef004007681624bffc89 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 21 Nov 2022 09:40:20 -0700 Subject: [PATCH 18/69] Avoid static graph restore This until the fix for https://github.com/NuGet/Home/issues/12177 is broadly available. --- Directory.Build.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 301047d1e..e78128b9b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,7 +17,8 @@ true - true + + false $(MSBuildThisFileDirectory) From ae66da74a2e324d3fc73753c691cfeb882d18daf Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 8 Nov 2022 22:24:14 -0700 Subject: [PATCH 19/69] Update to the .NET 7 SDK --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 3ce46e096..e5187f36c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.402", + "version": "7.0.100", "rollForward": "patch", "allowPrerelease": false } From ca3ab7d086ec1559228a26e454f6dc71e920066e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 21 Nov 2022 20:06:18 -0700 Subject: [PATCH 20/69] Enable NuGet CPVM transitive pinning --- Directory.Packages.props | 1 + 1 file changed, 1 insertion(+) diff --git a/Directory.Packages.props b/Directory.Packages.props index 924f4b4e0..5ce5b0f00 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,6 +2,7 @@ true + true From 6bcec4372bd8508a7513aa6653712b2388a94a9a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 22 Nov 2022 09:05:12 -0700 Subject: [PATCH 21/69] Fix build on machines with Visual Studio 2022 Update 3 This is a workaround for Azure Pipelines Hosted agents, which haven't upgraded to Dev17.4 yet. --- Directory.Packages.props | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5ce5b0f00..e9475f7cb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,6 +15,7 @@ + @@ -25,6 +26,7 @@ + @@ -32,4 +34,4 @@ - \ No newline at end of file + From 6a34c4f283848ed96447f3ce5fde429309112fe0 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 22 Nov 2022 09:23:41 -0700 Subject: [PATCH 22/69] Switch back to `GlobalPackageReference` --- Directory.Packages.props | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index e9475f7cb..5996640f0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,28 +10,15 @@ - - - - - - - + + + + + + - - - - - - - - - - - - + From fb2b395fce67a75e5be07443e204fc5b905b6983 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 24 Nov 2022 13:21:22 -0700 Subject: [PATCH 23/69] Drop the .NET compilers toolset pin This reverts "Fix build on machines with Visual Studio 2022 Update 3" since Azure Pipelines now has Update 4 installed. This reverts commit 6bcec4372bd8508a7513aa6653712b2388a94a9a. --- Directory.Packages.props | 1 - 1 file changed, 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5996640f0..8e696a7e9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,7 +13,6 @@ - From a32f820b0f145106b6a7182079a59adf7e9554a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:45:54 -0700 Subject: [PATCH 24/69] Bump Microsoft.CodeCoverage (#182) Bumps [Microsoft.CodeCoverage](https://github.com/microsoft/vstest) from 17.5.0-preview-20221109-01 to 17.5.0-preview-20221201-01. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/commits) --- updated-dependencies: - dependency-name: Microsoft.CodeCoverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8e696a7e9..056c53494 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From e7ed3b30668a893d23584ecf05294d7b14f6b445 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 1 Dec 2022 14:46:40 -0700 Subject: [PATCH 25/69] Bump Microsoft.CodeCoverage from 17.5.0-preview-20221201-01 to 17.5.0-preview-20221201-06 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 056c53494..f19a9842e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From a24d8a1e51e439376edc8cf3753f4460c2044204 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 15 Dec 2022 09:05:55 -0700 Subject: [PATCH 26/69] Drop netcoreapp3.1 targeting Also update the .NET SDK to 7.0.101 --- .devcontainer/Dockerfile | 3 ++- global.json | 2 +- test/Library.Tests/CalculatorTests.cs | 2 +- test/Library.Tests/Library.Tests.csproj | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5c1bdc7ab..7ffd07efb 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,5 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0.401-focal +# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions +FROM mcr.microsoft.com/dotnet/sdk:7.0.101-jammy # 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 e5187f36c..cc08211e2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.100", + "version": "7.0.101", "rollForward": "patch", "allowPrerelease": false } diff --git a/test/Library.Tests/CalculatorTests.cs b/test/Library.Tests/CalculatorTests.cs index 042e7d940..0e7e83391 100644 --- a/test/Library.Tests/CalculatorTests.cs +++ b/test/Library.Tests/CalculatorTests.cs @@ -14,7 +14,7 @@ public CalculatorTests() public void AddOrSubtract() { // This tests aggregation of code coverage across test runs. -#if NETCOREAPP3_1 +#if NET6_0_OR_GREATER Assert.Equal(3, Calculator.Add(1, 2)); #else Assert.Equal(-1, Calculator.Subtract(1, 2)); diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index 2eb4afe1e..d557e4c72 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;netcoreapp3.1;net472 + net6.0;net472 From 2da647834cdc78b9399967a813a4d2ef6461c437 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 15 Dec 2022 09:22:45 -0700 Subject: [PATCH 27/69] Multitarget the library .NET Standard 2.0 is still relevant because it's the last TFM that works on all .NET runtimes. But it's also very old, depriving the developer of the nullable ref annotations that are in later versions of .NET that can help reduce bugs. There are also newer APIs that can be *automatically* consumed by the compiler based on newer TFMs even without using `#if` in your code that can improve runtime performance of the code. --- src/Library/Library.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Library/Library.csproj b/src/Library/Library.csproj index a7547da10..b6b926ab7 100644 --- a/src/Library/Library.csproj +++ b/src/Library/Library.csproj @@ -1,6 +1,6 @@ - netstandard2.0 + net6.0;netstandard2.0 README.md From dfd69e0a9d0062a445e6bd4c2c0131d41f588a77 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 15 Dec 2022 09:26:42 -0700 Subject: [PATCH 28/69] Avoid System.Net.Http compile error when targeting net472 --- Directory.Build.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 65a15bfc8..cbe19ca0e 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -4,5 +4,10 @@ false + + + + + From 8121dad9b92d083ef3500956182a84f4674ea2b4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 15 Dec 2022 09:48:06 -0700 Subject: [PATCH 29/69] Drop obsolete WPF workarounds --- Directory.Build.props | 8 -------- Directory.Build.targets | 2 -- 2 files changed, 10 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e78128b9b..7980f5280 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -62,23 +62,15 @@ - <_WpfTempProjectNuGetFilePathNoExt>$(BaseIntermediateOutputPath)..\$(_TargetAssemblyProjectName)\$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g - false false false false - - - diff --git a/Directory.Build.targets b/Directory.Build.targets index cbe19ca0e..ea7b6e6f8 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -8,6 +8,4 @@ - - From 435bda683b3d32c46261684af3c5291e81ed5acd Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 15 Dec 2022 09:03:17 -0700 Subject: [PATCH 30/69] Add emoticons to github workflows --- .github/workflows/build.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a56a6dda2..7718f84ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - - name: Install prerequisites + - name: โš™ Install prerequisites run: | ./init.ps1 -UpgradePrerequisites dotnet --info @@ -40,75 +40,75 @@ jobs: mono --version } shell: pwsh - - name: Set pipeline variables based on source + - name: โš™๏ธ Set pipeline variables based on source run: azure-pipelines/variables/_pipelines.ps1 shell: pwsh - - name: build + - name: ๐Ÿ›  build run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" - - name: test + - name: ๐Ÿงช test run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} shell: pwsh - - name: Update pipeline variables based on build outputs + - name: โš™ Update pipeline variables based on build outputs run: azure-pipelines/variables/_pipelines.ps1 shell: pwsh - - name: Collect artifacts + - name: ๐Ÿ“ฅ Collect artifacts run: azure-pipelines/artifacts/_stage_all.ps1 shell: pwsh if: always() - - name: Upload project.assets.json files + - name: ๐Ÿ“ข Upload project.assets.json files if: always() uses: actions/upload-artifact@v1 with: name: projectAssetsJson-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/projectAssetsJson continue-on-error: true - - name: Upload variables + - name: ๐Ÿ“ข Upload variables uses: actions/upload-artifact@v1 with: name: variables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/Variables continue-on-error: true - - name: Upload build_logs + - name: ๐Ÿ“ข Upload build_logs if: always() uses: actions/upload-artifact@v1 with: name: build_logs-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/build_logs continue-on-error: true - - name: Upload test_logs + - name: ๐Ÿ“ข Upload test_logs if: always() uses: actions/upload-artifact@v1 with: name: test_logs-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/test_logs continue-on-error: true - - name: Upload testResults + - name: ๐Ÿ“ข Upload testResults if: always() uses: actions/upload-artifact@v1 with: name: testResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/testResults continue-on-error: true - - name: Upload coverageResults + - name: ๐Ÿ“ข Upload coverageResults if: always() uses: actions/upload-artifact@v1 with: name: coverageResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/coverageResults continue-on-error: true - - name: Upload symbols + - name: ๐Ÿ“ข Upload symbols uses: actions/upload-artifact@v1 with: name: symbols-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/symbols continue-on-error: true - - name: Upload deployables + - name: ๐Ÿ“ข Upload deployables uses: actions/upload-artifact@v1 with: name: deployables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/deployables if: always() - - name: Publish code coverage results to codecov.io + - name: ๐Ÿ“ข Publish code coverage results to codecov.io run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}Host,${{ env.BUILDCONFIGURATION }}" shell: pwsh timeout-minutes: 3 From 2107c6a84526544f8c00f4f86bc6390f234a4036 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 17 Dec 2022 16:40:56 -0700 Subject: [PATCH 31/69] Bump C# language version to 11 Just use `latest` so it'll be whatever the SDK version permits. Dropping the property altogether would use the formally recommended version for the TFM, which is less desirable. --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7980f5280..d722f5e49 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ $(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\ $(RepoRootPath)bin\$(MSBuildProjectName)\ $(RepoRootPath)bin\Packages\$(Configuration)\ - 10.0 + latest enable enable latest From 7e26321035767c832e5205ad71be7e666b4d8d2a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 17 Dec 2022 17:14:19 -0700 Subject: [PATCH 32/69] Bump Microsoft.NET.Test.Sdk to 17.4.1 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f19a9842e..9ec9d10c9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - + From 73ed0f8cc96286dc9a188662178e64e2aaf2ee73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 09:47:36 -0700 Subject: [PATCH 33/69] Bump Microsoft.CodeCoverage (#187) Bumps [Microsoft.CodeCoverage](https://github.com/microsoft/vstest) from 17.5.0-preview-20221201-06 to 17.5.0-release-20221220-01. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/commits) --- updated-dependencies: - dependency-name: Microsoft.CodeCoverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9ec9d10c9..bfa98614d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From 1d09284ec92f9a50dc84d7c15a009688a22c889d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 4 Jan 2023 09:23:52 -0700 Subject: [PATCH 34/69] Switch code coverage from static to dynamic instrumentation --- azure-pipelines/test.runsettings | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines/test.runsettings b/azure-pipelines/test.runsettings index 975b71233..4e24a0a65 100644 --- a/azure-pipelines/test.runsettings +++ b/azure-pipelines/test.runsettings @@ -36,8 +36,6 @@ False True - True - False From c36559cdfe5273db85685f965919b7ee86452571 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 5 Jan 2023 13:44:09 -0700 Subject: [PATCH 35/69] Upgrade Microsoft.CodeCoverage --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index bfa98614d..1acbd174c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From 77e4b5106dd74aa25564ba0631212146184a1f2d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 6 Jan 2023 09:30:23 -0700 Subject: [PATCH 36/69] Fix merge coverage error when output directory already exists --- azure-pipelines/Merge-CodeCoverage.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/Merge-CodeCoverage.ps1 b/azure-pipelines/Merge-CodeCoverage.ps1 index 9fe925cf6..02ff12b00 100644 --- a/azure-pipelines/Merge-CodeCoverage.ps1 +++ b/azure-pipelines/Merge-CodeCoverage.ps1 @@ -41,7 +41,7 @@ if ($reports) { $Inputs = $reports |% { Resolve-Path -relative $_.FullName } - if (Split-Path $OutputFile) { + if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) { New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null } From eb847be2bae977a110c44d683d43e253cea8ec8c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 13 Jan 2023 06:54:39 -0700 Subject: [PATCH 37/69] .gitignore .DS_Store --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3bb499198..69599b879 100644 --- a/.gitignore +++ b/.gitignore @@ -349,3 +349,6 @@ MigrationBackup/ # dotnet tool local install directory .store/ + +# mac-created file to track user view preferences for a directory +.DS_Store From c4d099cb455f118c23cd10a2b53553fc38aba490 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 22 Jan 2023 09:06:39 -0700 Subject: [PATCH 38/69] Increase likelihood that folks set PackageProjectUrl property --- .editorconfig | 6 +++--- Directory.Build.props | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index c8b5de9ac..078687778 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,12 +19,12 @@ indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true -# Xml project files -[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}] +# MSBuild project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}] indent_size = 2 # Xml config files -[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}] +[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}] indent_size = 2 # JSON files diff --git a/Directory.Build.props b/Directory.Build.props index d722f5e49..35fd4f69a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -29,6 +29,7 @@ true $(MSBuildThisFileDirectory)strongname.snk + COMPANY-PLACEHOLDER COMPANY-PLACEHOLDER ยฉ COMPANY-PLACEHOLDER. All rights reserved. @@ -50,8 +51,7 @@ - - + $(PackageProjectUrl)/releases/tag/v$(Version) From 07df47ef04adb71c6d6a3e6bf8b560e5ff4c96db Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 22 Jan 2023 13:29:41 -0700 Subject: [PATCH 39/69] Bump Microsoft.CodeCoverage to 17.5.0-release-20230106-01 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1acbd174c..02f1d7072 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From f7f6ed362751d7a3fd9d11026a0a42ec10e1cf0b Mon Sep 17 00:00:00 2001 From: Kartheek Penagamuri <52756182+kartheekp-ms@users.noreply.github.com> Date: Tue, 31 Jan 2023 17:32:49 -0800 Subject: [PATCH 40/69] Use latest NuGet.exe version (#188) * Use latest NuGet.exe version * Use 6.4.0 NuGet.exe version --- azure-pipelines/Get-NuGetTool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/Get-NuGetTool.ps1 b/azure-pipelines/Get-NuGetTool.ps1 index 4431adb91..3097c8736 100644 --- a/azure-pipelines/Get-NuGetTool.ps1 +++ b/azure-pipelines/Get-NuGetTool.ps1 @@ -6,7 +6,7 @@ #> Param( [Parameter()] - [string]$NuGetVersion='5.2.0' + [string]$NuGetVersion='6.4.0' ) $toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" From 4de45d4b12398d099da69b59a2a18dcb4782ba87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:39:21 -0700 Subject: [PATCH 41/69] Bump Microsoft.CodeCoverage (#189) Bumps [Microsoft.CodeCoverage](https://github.com/microsoft/vstest) from 17.5.0-release-20230106-01 to 17.5.0-release-20230131-04. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/commits) --- updated-dependencies: - dependency-name: Microsoft.CodeCoverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 02f1d7072..a46323fa9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From 196667f6bb050431e195fc24d4e14b96195b999d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Feb 2023 06:28:22 -0700 Subject: [PATCH 42/69] Build fixes --- Directory.Packages.props | 3 +-- azure-pipelines.yml | 4 ++++ test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c9e45b597..b3b36dc3b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,11 +11,10 @@ - - + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 876d827b2..f36042226 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -101,6 +101,10 @@ stages: pool: vmImage: $(imageName) steps: + - checkout: self + fetchDepth: 0 # avoid shallow clone so nbgv can do its work. + clean: true + submodules: true # keep the warnings quiet about the wiki not being enlisted - task: UseDotNet@2 displayName: Install .NET 7.0.101 SDK inputs: diff --git a/test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj b/test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj index 8cc968989..254361be3 100644 --- a/test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj +++ b/test/Cake.GitVersioning.Tests/Cake.GitVersioning.Tests.csproj @@ -15,7 +15,7 @@ - + From 6712b775c619d2aab486b5c0d8afdd09b56460c4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Feb 2023 06:37:11 -0700 Subject: [PATCH 43/69] More perf run fixes --- azure-pipelines.yml | 4 ++-- .../GetVersionBenchmarks.cs | 5 ++--- .../Nerdbank.GitVersioning.Benchmarks.csproj | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f36042226..fff3e4309 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -123,7 +123,7 @@ stages: dotnet build -c Release displayName: Build in Release mode - script: | - dotnet run -c Release -f net6.0 -- --filter *GetVersionBenchmarks* --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/packed/$(imageName) + dotnet run -c Release -f net7.0 -- --filter *GetVersionBenchmarks* --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/packed/$(imageName) workingDirectory: test/Nerdbank.GitVersioning.Benchmarks displayName: Run benchmarks (packed) - bash: | @@ -140,7 +140,7 @@ stages: git unpack-objects < .git/objects/pack/*.pack displayName: Unpack Git repositories - script: | - dotnet run -c Release -f net6.0 -- --filter '*GetVersionBenchmarks*' --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/unpacked/$(imageName) + dotnet run -c Release -f net7.0 -- --filter '*GetVersionBenchmarks*' --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/unpacked/$(imageName) workingDirectory: test/Nerdbank.GitVersioning.Benchmarks displayName: Run benchmarks (unpacked) - task: PublishBuildArtifacts@1 diff --git a/test/Nerdbank.GitVersioning.Benchmarks/GetVersionBenchmarks.cs b/test/Nerdbank.GitVersioning.Benchmarks/GetVersionBenchmarks.cs index 214ab17b0..7a97daa88 100644 --- a/test/Nerdbank.GitVersioning.Benchmarks/GetVersionBenchmarks.cs +++ b/test/Nerdbank.GitVersioning.Benchmarks/GetVersionBenchmarks.cs @@ -9,9 +9,8 @@ namespace Nerdbank.GitVersioning.Benchmarks { - [SimpleJob(RuntimeMoniker.NetCoreApp31, baseline: true)] - [SimpleJob(RuntimeMoniker.Net60)] - [SimpleJob(RuntimeMoniker.Net461)] + [SimpleJob(RuntimeMoniker.Net70)] + [SimpleJob(RuntimeMoniker.Net462, baseline: true)] public class GetVersionBenchmarks { // You must manually clone these repositories: diff --git a/test/Nerdbank.GitVersioning.Benchmarks/Nerdbank.GitVersioning.Benchmarks.csproj b/test/Nerdbank.GitVersioning.Benchmarks/Nerdbank.GitVersioning.Benchmarks.csproj index 3a2ea914a..6e0ed52af 100644 --- a/test/Nerdbank.GitVersioning.Benchmarks/Nerdbank.GitVersioning.Benchmarks.csproj +++ b/test/Nerdbank.GitVersioning.Benchmarks/Nerdbank.GitVersioning.Benchmarks.csproj @@ -1,7 +1,7 @@ ๏ปฟ - net6.0 + net7.0 $(TargetFrameworks);net462 Exe true From dd2159511d6cf270578b191b28b7e64afcf428ae Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Feb 2023 06:44:48 -0700 Subject: [PATCH 44/69] Avoid build number warnings, and set the build number earlier by moving to linux agent --- azure-pipelines/build.yml | 5 ++--- version.json | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 96022d351..ed918468b 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -26,9 +26,6 @@ jobs: & .\dotnet-install.ps1 -Architecture x86 -Version 7.0.101 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose displayName: โš™ Install 32-bit .NET SDK and runtimes - - powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c' - displayName: โš™ Set build number - - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} @@ -42,6 +39,8 @@ jobs: clean: true submodules: true # keep the warnings quiet about the wiki not being enlisted - template: install-dependencies.yml + - powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c' + displayName: โš™ Set build number - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} diff --git a/version.json b/version.json index 04420d359..f71e89462 100644 --- a/version.json +++ b/version.json @@ -10,6 +10,9 @@ "^refs/heads/v\\d+\\.\\d+$" ], "cloudBuild": { - "setVersionVariables": false + "setVersionVariables": false, + "buildNumber": { + "enabled": false + } } } From 8cde04c964c032cd17a715eda1d43afd2ed75df2 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Feb 2023 12:42:38 -0700 Subject: [PATCH 45/69] Add pipeline emoji icons --- azure-pipelines/dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 3fe2e61b3..92ffd9701 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -6,21 +6,21 @@ steps: - script: | git config --global user.name ci git config --global user.email me@ci.com - displayName: Configure git commit author for testing + displayName: โš™๏ธ Configure git commit author for testing - script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog" displayName: ๐Ÿ›  dotnet build - script: dotnet pack -c $(BuildConfiguration) --no-build -p:PackLKG=true /bl:"$(Build.ArtifactStagingDirectory)/build_logs/msbuild_lkg.binlog" - displayName: Build LKG package + displayName: ๐Ÿ› ๏ธ Build LKG package workingDirectory: src/Nerdbank.GitVersioning.Tasks - script: dotnet publish -c $(BuildConfiguration) -o ../nerdbank-gitversioning.npm/out/nbgv.cli/tools/net6.0/any /bl:"$(Build.ArtifactStagingDirectory)/build_logs/nbgv_publish.binlog" - displayName: Publish nbgv tool + displayName: ๐Ÿ“ข Publish nbgv tool workingDirectory: src/nbgv - script: yarn build - displayName: Build nerdbank-gitversioning NPM package + displayName: ๐Ÿ› ๏ธ Build nerdbank-gitversioning NPM package workingDirectory: src/nerdbank-gitversioning.npm - powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults From f17518be33e4b76fafc8f4b3a6096aa00ca8ceb1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 9 Feb 2023 16:46:32 -0700 Subject: [PATCH 46/69] Update the dotnet-install.ps1 script This enables downloading newer SDK versions. --- tools/Install-DotNetSdk.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 2bac3b9bc..a71ff3fd1 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -234,10 +234,10 @@ if ($IncludeX86) { } if ($IsMacOS -or $IsLinux) { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/781752509a890ca7520f1182e8bae71f9a53d754/src/dotnet-install.sh" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/88bd34f089b8a023e3523f22c92abd0ab88e4409/src/dotnet-install.sh" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh" } else { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/781752509a890ca7520f1182e8bae71f9a53d754/src/dotnet-install.ps1" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/88bd34f089b8a023e3523f22c92abd0ab88e4409/src/dotnet-install.ps1" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1" } From 551183c1e900d30e0e8b7623c910be160a690b4e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 9 Feb 2023 16:52:41 -0700 Subject: [PATCH 47/69] Improve error message for unsupported versions --- tools/Install-DotNetSdk.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index a71ff3fd1..14f4c8c4d 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -98,7 +98,12 @@ Function Get-InstallerExe( [string]$sku ) { # Get the latest/actual version for the specified one - $TypedVersion = [Version]$Version + $TypedVersion = $null + if (![Version]::TryParse($Version, [ref] $TypedVersion)) { + Write-Error "Unable to parse $Version into an a.b.c.d version. This version cannot be installed machine-wide." + exit 1 + } + if ($TypedVersion.Build -eq -1) { $versionInfo = -Split (Invoke-WebRequest -Uri "https://dotnetcli.blob.core.windows.net/dotnet/$sku/$Version/latest.version" -UseBasicParsing) $Version = $versionInfo[-1] From 8381192a53608e7a655dfaf4f58a6edf64f8fa76 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 9 Feb 2023 17:00:31 -0700 Subject: [PATCH 48/69] Remove references to "Core" in .NET Core --- tools/Install-DotNetSdk.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 14f4c8c4d..47ccf22ed 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -3,7 +3,7 @@ <# .SYNOPSIS Installs the .NET SDK specified in the global.json file at the root of this repository, - along with supporting .NET Core runtimes used for testing. + along with supporting .NET runtimes used for testing. .DESCRIPTION This MAY not require elevation, as the SDK and runtimes are installed locally to this repo location, unless `-InstallLocality machine` is specified. @@ -43,7 +43,7 @@ if (!$arch) { # Windows Powershell leaves this blank if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { $arch = 'ARM64' } } -# Search for all .NET Core runtime versions referenced from MSBuild projects and arrange to install them. +# Search for all .NET runtime versions referenced from MSBuild projects and arrange to install them. $runtimeVersions = @() $windowsDesktopRuntimeVersions = @() Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\test\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% { @@ -145,9 +145,9 @@ Function Get-InstallerExe( } Function Install-DotNet($Version, $Architecture, [ValidateSet('Sdk','Runtime','WindowsDesktop')][string]$sku = 'Sdk') { - Write-Host "Downloading .NET Core $sku $Version..." + Write-Host "Downloading .NET $sku $Version..." $Installer = Get-InstallerExe -Version $Version -Architecture $Architecture -sku $sku - Write-Host "Installing .NET Core $sku $Version..." + Write-Host "Installing .NET $sku $Version..." cmd /c start /wait $Installer /install /passive /norestart if ($LASTEXITCODE -eq 3010) { Write-Verbose "Restart required" @@ -290,7 +290,7 @@ if ($IncludeX86) { $dotnetRuntimeSwitches = $switches + '-Runtime','dotnet' $runtimeVersions | Sort-Object -Unique |% { - if ($PSCmdlet.ShouldProcess(".NET Core $Arch runtime $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET $Arch runtime $_", "Install")) { $anythingInstalled = $true Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture $arch -InstallDir $DotNetInstallDir $dotnetRuntimeSwitches" @@ -303,7 +303,7 @@ $runtimeVersions | Sort-Object -Unique |% { } if ($IncludeX86) { - if ($PSCmdlet.ShouldProcess(".NET Core x86 runtime $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET x86 runtime $_", "Install")) { $anythingInstalled = $true Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture x86 -InstallDir $DotNetX86InstallDir $dotnetRuntimeSwitches" @@ -320,7 +320,7 @@ $runtimeVersions | Sort-Object -Unique |% { $windowsDesktopRuntimeSwitches = $switches + '-Runtime','windowsdesktop' $windowsDesktopRuntimeVersions | Sort-Object -Unique |% { - if ($PSCmdlet.ShouldProcess(".NET Core WindowsDesktop $arch runtime $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET WindowsDesktop $arch runtime $_", "Install")) { $anythingInstalled = $true Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture $arch -InstallDir $DotNetInstallDir $windowsDesktopRuntimeSwitches" @@ -333,7 +333,7 @@ $windowsDesktopRuntimeVersions | Sort-Object -Unique |% { } if ($IncludeX86) { - if ($PSCmdlet.ShouldProcess(".NET Core WindowsDesktop x86 runtime $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET WindowsDesktop x86 runtime $_", "Install")) { $anythingInstalled = $true Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture x86 -InstallDir $DotNetX86InstallDir $windowsDesktopRuntimeSwitches" @@ -352,5 +352,5 @@ if ($PSCmdlet.ShouldProcess("Set DOTNET environment variables to discover these } if ($anythingInstalled -and ($InstallLocality -ne 'machine') -and !$env:TF_BUILD -and !$env:GITHUB_ACTIONS) { - Write-Warning ".NET Core runtimes or SDKs were installed to a non-machine location. Perform your builds or open Visual Studio from this same environment in order for tools to discover the location of these dependencies." + Write-Warning ".NET runtimes or SDKs were installed to a non-machine location. Perform your builds or open Visual Studio from this same environment in order for tools to discover the location of these dependencies." } From d19033347c00cf09ef9201a6a4d25a19673d8de4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 9 Feb 2023 17:07:26 -0700 Subject: [PATCH 49/69] Add -SdkOnly switch --- tools/Install-DotNetSdk.ps1 | 53 ++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 47ccf22ed..39e47eb60 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -15,6 +15,8 @@ When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used. Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`. Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it. +.PARAMETER SdkOnly + Skips installing the runtime. .PARAMETER IncludeX86 Installs a x86 SDK and runtimes in addition to the x64 ones. Only supported on Windows. Ignored on others. #> @@ -22,6 +24,7 @@ Param ( [ValidateSet('repo','user','machine')] [string]$InstallLocality='user', + [switch]$SdkOnly, [switch]$IncludeX86 ) @@ -46,34 +49,36 @@ if (!$arch) { # Windows Powershell leaves this blank # Search for all .NET runtime versions referenced from MSBuild projects and arrange to install them. $runtimeVersions = @() $windowsDesktopRuntimeVersions = @() -Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\test\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% { - $projXml = [xml](Get-Content -Path $_) - $pg = $projXml.Project.PropertyGroup - if ($pg) { - $targetFrameworks = @() - $tf = $pg.TargetFramework - $targetFrameworks += $tf - $tfs = $pg.TargetFrameworks - if ($tfs) { - $targetFrameworks = $tfs -Split ';' +if (!$SdkOnly) { + Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\test\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% { + $projXml = [xml](Get-Content -Path $_) + $pg = $projXml.Project.PropertyGroup + if ($pg) { + $targetFrameworks = @() + $tf = $pg.TargetFramework + $targetFrameworks += $tf + $tfs = $pg.TargetFrameworks + if ($tfs) { + $targetFrameworks = $tfs -Split ';' + } } - } - $targetFrameworks |? { $_ -match 'net(?:coreapp)?(\d+\.\d+)' } |% { - $v = $Matches[1] - $runtimeVersions += $v - if ($v -ge '3.0' -and -not ($IsMacOS -or $IsLinux)) { - $windowsDesktopRuntimeVersions += $v + $targetFrameworks |? { $_ -match 'net(?:coreapp)?(\d+\.\d+)' } |% { + $v = $Matches[1] + $runtimeVersions += $v + if ($v -ge '3.0' -and -not ($IsMacOS -or $IsLinux)) { + $windowsDesktopRuntimeVersions += $v + } } - } - # Add target frameworks of the form: netXX - $targetFrameworks |? { $_ -match 'net(\d+\.\d+)' } |% { - $v = $Matches[1] - $runtimeVersions += $v - if (-not ($IsMacOS -or $IsLinux)) { - $windowsDesktopRuntimeVersions += $v + # Add target frameworks of the form: netXX + $targetFrameworks |? { $_ -match 'net(\d+\.\d+)' } |% { + $v = $Matches[1] + $runtimeVersions += $v + if (-not ($IsMacOS -or $IsLinux)) { + $windowsDesktopRuntimeVersions += $v + } } - } + } } Function Get-FileFromWeb([Uri]$Uri, $OutDir) { From 1aa9eca8727b517ef805f7e61ea57d578ccd4e49 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 10 Feb 2023 16:01:08 -0700 Subject: [PATCH 50/69] Bump tests to .NET 7 This is an attempt to get msbuildlocator to work on Azure Pipelines. --- .../Nerdbank.GitVersioning.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Nerdbank.GitVersioning.Tests/Nerdbank.GitVersioning.Tests.csproj b/test/Nerdbank.GitVersioning.Tests/Nerdbank.GitVersioning.Tests.csproj index c84cab46f..a79c174d1 100644 --- a/test/Nerdbank.GitVersioning.Tests/Nerdbank.GitVersioning.Tests.csproj +++ b/test/Nerdbank.GitVersioning.Tests/Nerdbank.GitVersioning.Tests.csproj @@ -1,6 +1,6 @@ ๏ปฟ - net6.0;net472 + net7.0;net472 true true full From 8d168d2c5365ee7aaa0c6add02748174bc3ef977 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 10 Feb 2023 16:36:49 -0700 Subject: [PATCH 51/69] Fix tests to find 32-bit MSBuild when required --- .../MSBuildExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs b/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs index 846795225..6cb214b9d 100644 --- a/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs +++ b/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs @@ -21,7 +21,20 @@ internal static void LoadMSBuild() { if (!loaded) { +#if NET + if (IntPtr.Size == 4) + { + // 32-bit .NET runtime requires special code to find the x86 SDK (where MSBuild is). + MSBuildLocator.RegisterMSBuildPath(@"C:\Program Files (x86)\dotnet\sdk\7.0.101"); + } + else + { + MSBuildLocator.RegisterDefaults(); + } +#else MSBuildLocator.RegisterDefaults(); +#endif + loaded = true; } } From c01126d8e995b239a17341ecec2e85bd0e02129b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Feb 2023 16:19:46 -0700 Subject: [PATCH 52/69] Simplify Version cast in ps1 script --- tools/Install-DotNetSdk.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 2bac3b9bc..a8635f497 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -92,19 +92,18 @@ Function Get-FileFromWeb([Uri]$Uri, $OutDir) { } Function Get-InstallerExe( - $Version, + [Version]$Version, $Architecture, [ValidateSet('Sdk','Runtime','WindowsDesktop')] [string]$sku ) { # Get the latest/actual version for the specified one - $TypedVersion = [Version]$Version - if ($TypedVersion.Build -eq -1) { + if ($Version.Build -eq -1) { $versionInfo = -Split (Invoke-WebRequest -Uri "https://dotnetcli.blob.core.windows.net/dotnet/$sku/$Version/latest.version" -UseBasicParsing) $Version = $versionInfo[-1] } - $majorMinor = "$($TypedVersion.Major).$($TypedVersion.Minor)" + $majorMinor = "$($Version.Major).$($Version.Minor)" $ReleasesFile = Join-Path $DotNetInstallScriptRoot "$majorMinor\releases.json" if (!(Test-Path $ReleasesFile)) { Get-FileFromWeb -Uri "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/$majorMinor/releases.json" -OutDir (Split-Path $ReleasesFile) | Out-Null From b3a68a9e4a6c37996ef969a54ac059ab62eae3d2 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 16 Feb 2023 13:02:03 -0700 Subject: [PATCH 53/69] Use LF line endings for plist files The mac tools that read these files are sticklers for LF endings. --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index c22a129ef..1f35e683d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,6 +7,9 @@ *.sh eol=lf *.ps1 eol=lf +# The macOS codesign tool is extremely picky, and requires LF line endings. +*.plist eol=lf + ############################################################################### # Set default behavior for command prompt diff. # From b579c7cabdad15c7b0b86446309f5297bd71cbb4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 16 Feb 2023 13:04:55 -0700 Subject: [PATCH 54/69] Add `-interactive` switch to init.ps1 --- init.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/init.ps1 b/init.ps1 index 774ead583..ad3b4145c 100755 --- a/init.ps1 +++ b/init.ps1 @@ -30,6 +30,8 @@ Skips the package restore step. .PARAMETER AccessToken An optional access token for authenticating to Azure Artifacts authenticated feeds. +.PARAMETER Interactive + Runs NuGet restore in interactive mode. This can turn authentication failures into authentication challenges. #> [CmdletBinding(SupportsShouldProcess = $true)] Param ( @@ -44,7 +46,9 @@ Param ( [Parameter()] [switch]$NoRestore, [Parameter()] - [string]$AccessToken + [string]$AccessToken, + [Parameter()] + [switch]$Interactive ) $EnvVars = @{} @@ -76,8 +80,14 @@ try { $HeaderColor = 'Green' if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) { + $RestoreArguments = @() + if ($Interactive) + { + $RestoreArguments += '--interactive' + } + Write-Host "Restoring NuGet packages" -ForegroundColor $HeaderColor - dotnet restore + dotnet restore @RestoreArguments if ($lastexitcode -ne 0) { throw "Failure while restoring packages." } From 6415323a89947e6d5d2229cd606cb02d18c1c474 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 24 Feb 2023 13:07:15 -0700 Subject: [PATCH 55/69] Bump dependencies to 17.5.0 versions --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a46323fa9..b792f3f6b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,8 +5,8 @@ true - - + + From 34f1344df70ea081e1875a83bf852c7bc4709954 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Feb 2023 09:28:14 -0700 Subject: [PATCH 56/69] Add msbuild extension for VS Code --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4ca016163..ca3a2aa9d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -11,7 +11,8 @@ "davidanson.vscode-markdownlint", "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", - "ms-azuretools.vscode-docker" + "ms-azuretools.vscode-docker", + "tintoy.msbuild-project-tools" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] From fb2395d9a7cc483f5f1a37a82b104fde93883b34 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Feb 2023 09:46:58 -0700 Subject: [PATCH 57/69] Add dotnet CLI tools --- .config/dotnet-tools.json | 18 ++++++++++++++++++ init.ps1 | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 000000000..2599e26ad --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "powershell": { + "version": "7.3.3", + "commands": [ + "pwsh" + ] + }, + "dotnet-format": { + "version": "5.1.250801", + "commands": [ + "dotnet-format" + ] + } + } +} \ No newline at end of file diff --git a/init.ps1 b/init.ps1 index ad3b4145c..5bace1e62 100755 --- a/init.ps1 +++ b/init.ps1 @@ -91,6 +91,11 @@ try { if ($lastexitcode -ne 0) { throw "Failure while restoring packages." } + + dotnet tool restore @RestoreArguments + if ($lastexitcode -ne 0) { + throw "Failure while restoring dotnet CLI tools." + } } & "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars -PrependPath $PrependPath | Out-Null From 0bfecd61cceeeb70cbe038c00fd8aac38b7ce32e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Feb 2023 15:23:55 -0700 Subject: [PATCH 58/69] Drop test-tools as a nuget feed source We don't need it now that we're using stable Microsoft.CodeCoverage package versions. --- nuget.config | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nuget.config b/nuget.config index 6ce7cfd05..22f7b8098 100644 --- a/nuget.config +++ b/nuget.config @@ -7,18 +7,9 @@ - - - - - - - - - From 5132c2206f248cc3ff0e65c0a087a74b6d734d77 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 11 Mar 2023 16:30:55 -0700 Subject: [PATCH 59/69] Add ASP.NET Core runtime installation support --- tools/Install-DotNetSdk.ps1 | 59 ++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 39e47eb60..6bff5c278 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -19,13 +19,16 @@ Skips installing the runtime. .PARAMETER IncludeX86 Installs a x86 SDK and runtimes in addition to the x64 ones. Only supported on Windows. Ignored on others. +.PARAMETER IncludeAspNetCore + Installs the ASP.NET Core runtime along with the .NET runtime. #> [CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Medium')] Param ( [ValidateSet('repo','user','machine')] [string]$InstallLocality='user', [switch]$SdkOnly, - [switch]$IncludeX86 + [switch]$IncludeX86, + [switch]$IncludeAspNetCore ) $DotNetInstallScriptRoot = "$PSScriptRoot/../obj/tools" @@ -49,6 +52,7 @@ if (!$arch) { # Windows Powershell leaves this blank # Search for all .NET runtime versions referenced from MSBuild projects and arrange to install them. $runtimeVersions = @() $windowsDesktopRuntimeVersions = @() +$aspnetRuntimeVersions = @() if (!$SdkOnly) { Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\test\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% { $projXml = [xml](Get-Content -Path $_) @@ -65,6 +69,7 @@ if (!$SdkOnly) { $targetFrameworks |? { $_ -match 'net(?:coreapp)?(\d+\.\d+)' } |% { $v = $Matches[1] $runtimeVersions += $v + $aspnetRuntimeVersions += $v if ($v -ge '3.0' -and -not ($IsMacOS -or $IsLinux)) { $windowsDesktopRuntimeVersions += $v } @@ -74,6 +79,7 @@ if (!$SdkOnly) { $targetFrameworks |? { $_ -match 'net(\d+\.\d+)' } |% { $v = $Matches[1] $runtimeVersions += $v + $aspnetRuntimeVersions += $v if (-not ($IsMacOS -or $IsLinux)) { $windowsDesktopRuntimeVersions += $v } @@ -81,6 +87,10 @@ if (!$SdkOnly) { } } +if (!$IncludeAspNetCore) { + $aspnetRuntimeVersions = @() +} + Function Get-FileFromWeb([Uri]$Uri, $OutDir) { $OutFile = Join-Path $OutDir $Uri.Segments[-1] if (!(Test-Path $OutFile)) { @@ -149,7 +159,7 @@ Function Get-InstallerExe( } } -Function Install-DotNet($Version, $Architecture, [ValidateSet('Sdk','Runtime','WindowsDesktop')][string]$sku = 'Sdk') { +Function Install-DotNet($Version, $Architecture, [ValidateSet('Sdk','Runtime','WindowsDesktop','AspNetCore')][string]$sku = 'Sdk') { Write-Host "Downloading .NET $sku $Version..." $Installer = Get-InstallerExe -Version $Version -Architecture $Architecture -sku $sku Write-Host "Installing .NET $sku $Version..." @@ -206,6 +216,17 @@ if ($InstallLocality -eq 'machine') { } } + $aspnetRuntimeVersions | Sort-Object | Get-Unique |% { + if ($PSCmdlet.ShouldProcess("ASP.NET Core $_", "Install")) { + Install-DotNet -Version $_ -sku AspNetCore -Architecture $arch + $restartRequired = $restartRequired -or ($LASTEXITCODE -eq 3010) + + if ($IncludeX86) { + Install-DotNet -Version $_ -sku AspNetCore -Architecture x86 + $restartRequired = $restartRequired -or ($LASTEXITCODE -eq 3010) + } + } + } if ($restartRequired) { Write-Host -ForegroundColor Yellow "System restart required" Exit 3010 @@ -244,10 +265,10 @@ if ($IncludeX86) { } if ($IsMacOS -or $IsLinux) { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/88bd34f089b8a023e3523f22c92abd0ab88e4409/src/dotnet-install.sh" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.sh" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh" } else { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/88bd34f089b8a023e3523f22c92abd0ab88e4409/src/dotnet-install.ps1" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.ps1" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1" } @@ -352,6 +373,36 @@ $windowsDesktopRuntimeVersions | Sort-Object -Unique |% { } } +$aspnetRuntimeSwitches = $switches + '-Runtime','aspnetcore' + +$aspnetRuntimeVersions | Sort-Object -Unique |% { + if ($PSCmdlet.ShouldProcess(".NET ASP.NET Core $arch runtime $_", "Install")) { + $anythingInstalled = $true + Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture $arch -InstallDir $DotNetInstallDir $aspnetRuntimeSwitches" + + if ($LASTEXITCODE -ne 0) { + Write-Error ".NET SDK installation failure: $LASTEXITCODE" + exit $LASTEXITCODE + } + } else { + Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture $arch -InstallDir $DotNetInstallDir $aspnetRuntimeSwitches -DryRun" + } + + if ($IncludeX86) { + if ($PSCmdlet.ShouldProcess(".NET ASP.NET Core x86 runtime $_", "Install")) { + $anythingInstalled = $true + Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture x86 -InstallDir $DotNetX86InstallDir $aspnetRuntimeSwitches" + + if ($LASTEXITCODE -ne 0) { + Write-Error ".NET SDK installation failure: $LASTEXITCODE" + exit $LASTEXITCODE + } + } else { + Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ -Architecture x86 -InstallDir $DotNetX86InstallDir $aspnetRuntimeSwitches -DryRun" + } + } +} + if ($PSCmdlet.ShouldProcess("Set DOTNET environment variables to discover these installed runtimes?")) { & "$PSScriptRoot/Set-EnvVars.ps1" -Variables $envVars -PrependPath $DotNetInstallDir | Out-Null } From a921f8dcaf0ba4f93dfec660f503d17ce19d58ea Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 11 Mar 2023 16:40:50 -0700 Subject: [PATCH 60/69] Drop Microsoft.CodeCoverage reference It's brought in via Microsoft.NET.Test.Sdk anyway. --- Directory.Packages.props | 1 - test/Library.Tests/Library.Tests.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index b792f3f6b..b523e5c63 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,6 @@ true - diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index d557e4c72..3a6cc044c 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -10,7 +10,6 @@ - From ea48c8eaa182f224ca3ed1a38f2a8034d15dacce Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Mar 2023 15:27:56 -0600 Subject: [PATCH 61/69] Updated SDK installer script to be able to find 7.0.200 --- tools/Install-DotNetSdk.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 6bff5c278..10af50411 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -137,6 +137,14 @@ Function Get-InstallerExe( if ($release.$sku.version -eq $Version) { $filesElement = $release.$sku.files } + if (!$filesElement -and ($sku -eq 'sdk') -and $release.sdks) { + foreach ($sdk in $release.sdks) { + if ($sdk.version -eq $Version) { + $filesElement = $sdk.files + break + } + } + } if ($filesElement) { foreach ($file in $filesElement) { @@ -155,7 +163,7 @@ Function Get-InstallerExe( if ($url) { Get-FileFromWeb -Uri $url -OutDir $DotNetInstallScriptRoot } else { - Write-Error "Unable to find release of $sku v$Version" + throw "Unable to find release of $sku v$Version" } } From 2987b4457b0242e91913e9d9f4b43b5db079fd50 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Mar 2023 15:31:46 -0600 Subject: [PATCH 62/69] Bump SDK version to 7.0.201 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index cc08211e2..cf9eefa6e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.101", + "version": "7.0.201", "rollForward": "patch", "allowPrerelease": false } From 99df8185b1a6aa6abb1cc98aa7f4c0245f8d9012 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 28 Mar 2023 15:53:46 -0600 Subject: [PATCH 63/69] Move `dotnet-coverage` to repo-level tool --- .config/dotnet-tools.json | 8 ++++- azure-pipelines/Merge-CodeCoverage.ps1 | 46 +++++++++++++------------- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2599e26ad..610b59c97 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -13,6 +13,12 @@ "commands": [ "dotnet-format" ] + }, + "dotnet-coverage": { + "version": "17.6.11", + "commands": [ + "dotnet-coverage" + ] } } -} \ No newline at end of file +} diff --git a/azure-pipelines/Merge-CodeCoverage.ps1 b/azure-pipelines/Merge-CodeCoverage.ps1 index 02ff12b00..5ecabbc9b 100644 --- a/azure-pipelines/Merge-CodeCoverage.ps1 +++ b/azure-pipelines/Merge-CodeCoverage.ps1 @@ -20,32 +20,32 @@ Param( ) $RepoRoot = [string](Resolve-Path $PSScriptRoot/..) - -if (!(Test-Path $RepoRoot/obj/dotnet-coverage*)) { - dotnet tool install --tool-path $RepoRoot/obj dotnet-coverage --version 17.4.3 --configfile $PSScriptRoot/justnugetorg.nuget.config -} - -Write-Verbose "Searching $Path for *.cobertura.xml files" -$reports = Get-ChildItem -Recurse $Path -Filter *.cobertura.xml - -if ($reports) { - $reports |% { $_.FullName } |% { - # In addition to replacing {reporoot}, we also normalize on one kind of slash so that the report aggregates data for a file whether data was collected on Windows or not. - $xml = [xml](Get-Content -Path $_) - $xml.coverage.packages.package.classes.class |? { $_.filename} |% { - $_.filename = $_.filename.Replace('{reporoot}', $RepoRoot).Replace([IO.Path]::AltDirectorySeparatorChar, [IO.Path]::DirectorySeparatorChar) +Push-Location $RepoRoot +try { + Write-Verbose "Searching $Path for *.cobertura.xml files" + $reports = Get-ChildItem -Recurse $Path -Filter *.cobertura.xml + + if ($reports) { + $reports |% { $_.FullName } |% { + # In addition to replacing {reporoot}, we also normalize on one kind of slash so that the report aggregates data for a file whether data was collected on Windows or not. + $xml = [xml](Get-Content -Path $_) + $xml.coverage.packages.package.classes.class |? { $_.filename} |% { + $_.filename = $_.filename.Replace('{reporoot}', $RepoRoot).Replace([IO.Path]::AltDirectorySeparatorChar, [IO.Path]::DirectorySeparatorChar) + } + + $xml.Save($_) } - $xml.Save($_) - } + $Inputs = $reports |% { Resolve-Path -relative $_.FullName } - $Inputs = $reports |% { Resolve-Path -relative $_.FullName } + if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) { + New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null + } - if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) { - New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null + & dotnet tool run dotnet-coverage merge $Inputs -o $OutputFile -f cobertura + } else { + Write-Error "No reports found to merge." } - - & "$RepoRoot/obj/dotnet-coverage" merge $Inputs -o $OutputFile -f cobertura -} else { - Write-Error "No reports found to merge." +} finally { + Pop-Location } From 14699417fbde409397e7efec56c1b33268ed3634 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 28 Mar 2023 15:58:33 -0600 Subject: [PATCH 64/69] Move `nbgv` into dotnet-tools.json --- .config/dotnet-tools.json | 6 ++++++ azure-pipelines/Get-nbgv.ps1 | 24 ------------------------ azure-pipelines/build.yml | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 azure-pipelines/Get-nbgv.ps1 diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 610b59c97..5d3dae876 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -19,6 +19,12 @@ "commands": [ "dotnet-coverage" ] + }, + "nbgv": { + "version": "3.5.119", + "commands": [ + "nbgv" + ] } } } diff --git a/azure-pipelines/Get-nbgv.ps1 b/azure-pipelines/Get-nbgv.ps1 deleted file mode 100644 index a5be2cf7c..000000000 --- a/azure-pipelines/Get-nbgv.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -<# -.SYNOPSIS - Gets the path to the nbgv CLI tool, installing it if necessary. -#> -Param( -) - -$existingTool = Get-Command "nbgv" -ErrorAction SilentlyContinue -if ($existingTool) { - return $existingTool.Path -} - -$toolInstallDir = & "$PSScriptRoot/Get-TempToolsPath.ps1" - -$toolPath = "$toolInstallDir/nbgv" -if (!(Test-Path $toolInstallDir)) { New-Item -Path $toolInstallDir -ItemType Directory | Out-Null } - -if (!(Get-Command $toolPath -ErrorAction SilentlyContinue)) { - Write-Host "Installing nbgv to $toolInstallDir" - dotnet tool install --tool-path "$toolInstallDir" nbgv --configfile "$PSScriptRoot/justnugetorg.nuget.config" | Out-Null -} - -# Normalize the path on the way out. -return (Get-Command $toolPath).Path diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index c8687859b..2e2f426e0 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -17,7 +17,7 @@ jobs: clean: true - template: install-dependencies.yml - - powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c' + - script: dotnet tool run nbgv cloud -c displayName: โš™ Set build number - template: dotnet.yml From 3f1e85823fac9136c058aaf48f4b8febed1d0843 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 28 Mar 2023 16:34:38 -0600 Subject: [PATCH 65/69] Install tools except when `-NoToolRestore` is specified --- init.ps1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/init.ps1 b/init.ps1 index 5bace1e62..6211304f8 100755 --- a/init.ps1 +++ b/init.ps1 @@ -28,6 +28,8 @@ No effect if -NoPrerequisites is specified. .PARAMETER NoRestore Skips the package restore step. +.PARAMETER NoToolRestore + Skips the dotnet tool restore step. .PARAMETER AccessToken An optional access token for authenticating to Azure Artifacts authenticated feeds. .PARAMETER Interactive @@ -46,6 +48,8 @@ Param ( [Parameter()] [switch]$NoRestore, [Parameter()] + [switch]$NoToolRestore, + [Parameter()] [string]$AccessToken, [Parameter()] [switch]$Interactive @@ -91,11 +95,13 @@ try { if ($lastexitcode -ne 0) { throw "Failure while restoring packages." } + } - dotnet tool restore @RestoreArguments - if ($lastexitcode -ne 0) { - throw "Failure while restoring dotnet CLI tools." - } + if (!$NoToolRestore -and $PSCmdlet.ShouldProcess("dotnet tool", "restore")) { + dotnet tool restore @RestoreArguments + if ($lastexitcode -ne 0) { + throw "Failure while restoring dotnet CLI tools." + } } & "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars -PrependPath $PrependPath | Out-Null From 2381c7276720eb8084c1006baf16e6ac6aae2c9a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 14 Apr 2023 20:54:34 -0600 Subject: [PATCH 66/69] Fix ARM64 detection on Windows Powershell --- tools/Install-DotNetSdk.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 10af50411..e190fcfbf 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -47,6 +47,7 @@ $arch = [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture if (!$arch) { # Windows Powershell leaves this blank $arch = 'x64' if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { $arch = 'ARM64' } + if (${env:ProgramFiles(Arm)}) { $arch = 'ARM64' } } # Search for all .NET runtime versions referenced from MSBuild projects and arrange to install them. From b3e9f4ee3722b395ea4e3cdae74e812b9884d8aa Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 16 Apr 2023 07:29:40 -0600 Subject: [PATCH 67/69] Bump up SDK and tools versions --- .config/dotnet-tools.json | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5d3dae876..151689b63 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.3.3", + "version": "7.3.4", "commands": [ "pwsh" ] @@ -15,7 +15,7 @@ ] }, "dotnet-coverage": { - "version": "17.6.11", + "version": "17.7.0", "commands": [ "dotnet-coverage" ] diff --git a/global.json b/global.json index cf9eefa6e..c7d7e468c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.201", + "version": "7.0.203", "rollForward": "patch", "allowPrerelease": false } From f2d80e4d7e4e64ffc413b297602c45578f544b9f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 16 Apr 2023 10:38:56 -0600 Subject: [PATCH 68/69] Fix 32-bit msbuild version reference --- test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs b/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs index 6cb214b9d..d77f7ba57 100644 --- a/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs +++ b/test/Nerdbank.GitVersioning.Tests/MSBuildExtensions.cs @@ -25,7 +25,7 @@ internal static void LoadMSBuild() if (IntPtr.Size == 4) { // 32-bit .NET runtime requires special code to find the x86 SDK (where MSBuild is). - MSBuildLocator.RegisterMSBuildPath(@"C:\Program Files (x86)\dotnet\sdk\7.0.101"); + MSBuildLocator.RegisterMSBuildPath(@"C:\Program Files (x86)\dotnet\sdk\7.0.203"); } else { From 39553c3fbcfc3a58f40fc394d829502cdd77d4c6 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 16 Apr 2023 10:42:07 -0600 Subject: [PATCH 69/69] Update .NET SDK more consistently --- .devcontainer/Dockerfile | 2 +- azure-pipelines.yml | 4 ++-- azure-pipelines/build.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7ffd07efb..01c94a90e 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:7.0.101-jammy +FROM mcr.microsoft.com/dotnet/sdk:7.0.203-jammy # 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/azure-pipelines.yml b/azure-pipelines.yml index fff3e4309..8ab8348e1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -106,10 +106,10 @@ stages: clean: true submodules: true # keep the warnings quiet about the wiki not being enlisted - task: UseDotNet@2 - displayName: Install .NET 7.0.101 SDK + displayName: Install .NET 7.0.203 SDK inputs: packageType: sdk - version: 7.0.101 + version: 7.0.203 - script: dotnet --info displayName: Show dotnet SDK info - bash: | diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 73f22820c..021256aeb 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -23,7 +23,7 @@ jobs: - template: install-dependencies.yml - pwsh: | Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1 - & .\dotnet-install.ps1 -Architecture x86 -Version 7.0.101 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose + & .\dotnet-install.ps1 -Architecture x86 -Version 7.0.203 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose displayName: โš™ Install 32-bit .NET SDK and runtimes - template: dotnet.yml