diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f0e4b95f..c9eb87b1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,15 +22,20 @@ jobs: MacOS: vmImage: macOS-latest Windows: - vmImage: windows-2019 + vmImage: windows-latest pool: vmImage: $(vmImage) steps: - task: UseDotNet@2 - displayName: Install .NET Core 3.1 SDK + displayName: Install .NET 5 SDK inputs: - version: '3.1.x' + version: '5.x' packageType: sdk + - task: UseDotNet@2 + displayName: Install .NET Core 3.1 runtime + inputs: + version: '3.1.x' + packageType: runtime - task: UseDotNet@2 displayName: Install .NET Core 2.1 runtime inputs: @@ -54,15 +59,15 @@ jobs: - publish: artifacts/ artifact: Packages displayName: Publish artifacts - condition: and(succeeded(), eq('windows-2019', variables['vmImage'])) + condition: and(succeeded(), eq('windows-latest', variables['vmImage'])) - powershell: ./docs/generate.ps1 -NoBuild displayName: Generate docs - condition: and(succeeded(), eq('windows-2019', variables['vmImage'])) + condition: and(succeeded(), eq('windows-latest', variables['vmImage'])) - powershell: ./docs/push.ps1 -a $(github-api-token-repo-write) displayName: Publish docs to GitHub Pages condition: | and( succeeded(), - eq('windows-2019', variables['vmImage']), + eq('windows-latest', variables['vmImage']), not(eq(variables['Build.Reason'], 'PullRequest')), eq(variables['Build.SourceBranch'], 'refs/heads/master')) diff --git a/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj b/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj index 837a6113..5289233b 100644 --- a/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj +++ b/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1;netcoreapp2.1 + net5.0;netcoreapp3.1;netcoreapp2.1 $(TargetFrameworks);net472 @@ -15,10 +15,10 @@ - - + + - + diff --git a/test/CommandLineUtils.Tests/OptionAttributeTests.cs b/test/CommandLineUtils.Tests/OptionAttributeTests.cs index cb8de4c7..80018a5c 100644 --- a/test/CommandLineUtils.Tests/OptionAttributeTests.cs +++ b/test/CommandLineUtils.Tests/OptionAttributeTests.cs @@ -241,7 +241,7 @@ public void BindsToStaticProperties() Assert.Equal(1, PrivateSetterProgram.StaticNumber); } -#if !NETCOREAPP3_1 +#if !NETCOREAPP3_1 && !NET5_0 // .NET Core 3.0 made an intentional breaking change // see https://github.com/dotnet/coreclr/issues/21268 [Fact] diff --git a/test/Hosting.CommandLine.Tests/McMaster.Extensions.Hosting.CommandLine.Tests.csproj b/test/Hosting.CommandLine.Tests/McMaster.Extensions.Hosting.CommandLine.Tests.csproj index be0bb97e..ddbb6ca5 100644 --- a/test/Hosting.CommandLine.Tests/McMaster.Extensions.Hosting.CommandLine.Tests.csproj +++ b/test/Hosting.CommandLine.Tests/McMaster.Extensions.Hosting.CommandLine.Tests.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.1;netcoreapp2.1 + net5.0;netcoreapp3.1;netcoreapp2.1 $(TargetFrameworks);net472 @@ -15,9 +15,9 @@ - - - + + +