@@ -18,66 +18,64 @@ jobs:
1818
1919 # Install NuGet
2020 - task : NuGetToolInstaller@0
21- displayName : Install NuGet 5. 6.0
21+ displayName : Install NuGet 6.0
2222 inputs :
23- versionSpec : 5.6 .0
23+ versionSpec : 6.0 .0
2424
2525 # Install NerdBank GitVersioning
2626 - task : DotNetCoreCLI@2
2727 displayName : Install NBGV tool
2828 inputs :
2929 command : custom
3030 custom : tool
31- arguments : install --tool-path . nbgv
31+ arguments : install -g nbgv
32+
33+ # Set Build Version
3234 - script : nbgv cloud
3335 displayName : Set NBGV version
3436
3537 # Verify headers
36- - powershell : .\ build\build .ps1 -Target Verify
38+ - pwsh : build/Update-Headers .ps1 -Verify
3739 displayName : Verify headers
3840
3941 # Build solution
40- - powershell : dotnet build -c Release
42+ - script : dotnet build -c Release
4143 displayName : Build solution
4244
4345 # Run .NET 6 tests
44- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNet6.trx" --framework net6.0 --configuration Release
46+ - script : dotnet test -c Release -f net6.0 -l "trx;LogFileName=VSTestResults_net6.0.trx"
4547 displayName : Run .NET 6 unit tests
4648
4749 # Run .NET Core 3.1 tests
48- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNetCore31.trx" --framework netcoreapp3.1 --configuration Release
50+ - script : dotnet test -c Release -f netcoreapp3.1 -l "trx;LogFileName=VSTestResults_netcoreapp3.1.trx"
4951 displayName : Run .NET Core 3.1 unit tests
5052
5153 # Run .NET Framework 4.7.2 tests
52- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNet472 .trx" --framework net472 --configuration Release
54+ - script : dotnet test -c Release -f net472 -l "trx;LogFileName=VSTestResults_net472 .trx"
5355 displayName : Run .NET Framework 4.7.2 unit tests
5456
5557 # Publish test results
5658 - task : PublishTestResults@2
5759 displayName : Publish test results
5860 inputs :
5961 testResultsFormat : ' VSTest'
60- testResultsFiles : ' **/VsTestResults *.trx'
62+ testResultsFiles : ' **/VSTestResults *.trx'
6163 condition : always()
6264
6365 # Create the NuGet package(s)
64- - powershell : dotnet pack --configuration Release
66+ - script : dotnet pack -c Release
6567 displayName : Create NuGet package(s)
6668
6769 # Sign package(s)
68- - task : PowerShell@2
70+ - pwsh : build/Sign-Package.ps1
6971 displayName : Authenticode sign packages
70- inputs :
71- filePath : build/Sign-Package.ps1
7272 env :
7373 SignClientUser : $(SignClientUser)
7474 SignClientSecret : $(SignClientSecret)
75- ArtifactDirectory : bin\ nupkg
76- condition : and(succeeded(), not(eq(variables['build.reason '], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
75+ ArtifactDirectory : bin/ nupkg
76+ condition : and(succeeded(), not(eq(variables['Build.Reason '], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
7777
7878 # Publish build artifacts
79- - task : PublishPipelineArtifact@1
79+ - publish : bin/nupkg
80+ artifact : Packages
8081 displayName : Publish package artifacts
81- inputs :
82- targetPath : .\bin\nupkg
83- artifactName : Packages
0 commit comments