verify-nupkgs.ps1 is invalid when the artifacts are signed. Signing adds a .signature.p7s file to a nupkg, which increases the number of actual files in the nupkgs and causes the validation to fail by an offset of +1.
This validation runs after signing as part of this target.
Example output from build with signing enabled:
Unzipping NuGet packages.
Verify NuGet packages files.
Verifying package 'Microsoft.TestPlatform.Internal.Uwp.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.CodeCoverage.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.NET.Test.Sdk.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.AdapterUtilities.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.Build.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.CLI.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.Extensions.TrxLogger.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.ObjectModel.17.13.0-preview-24523-01'.
Verifying package 'Microsoft.TestPlatform.TranslationLayer.17.13.0-preview-24523-01'.
Verify-Nuget-Packages : There are 9 errors:
Number of files are not equal for 'Microsoft.TestPlatform.Internal.Uwp.17.13.0-preview-24523-01', expected: 38 actual:
39
Number of files are not equal for 'Microsoft.CodeCoverage.17.13.0-preview-24523-01', expected: 59 actual: 60
Number of files are not equal for 'Microsoft.NET.Test.Sdk.17.13.0-preview-24523-01', expected: 15 actual: 16
Number of files are not equal for 'Microsoft.TestPlatform.AdapterUtilities.17.13.0-preview-24523-01', expected: 75
actual: 76
Number of files are not equal for 'Microsoft.TestPlatform.Build.17.13.0-preview-24523-01', expected: 20 actual: 21
Number of files are not equal for 'Microsoft.TestPlatform.CLI.17.13.0-preview-24523-01', expected: 471 actual: 472
Number of files are not equal for 'Microsoft.TestPlatform.Extensions.TrxLogger.17.13.0-preview-24523-01', expected: 34
actual: 35
Number of files are not equal for 'Microsoft.TestPlatform.ObjectModel.17.13.0-preview-24523-01', expected: 92 actual:
93
Number of files are not equal for 'Microsoft.TestPlatform.TranslationLayer.17.13.0-preview-24523-01', expected: 122
actual: 123
I think that the solution here is to either 1) skip the test when signing or 2) modify the test to increase the expected number of files by one when signing.
verify-nupkgs.ps1 is invalid when the artifacts are signed. Signing adds a
.signature.p7sfile to a nupkg, which increases the number of actual files in the nupkgs and causes the validation to fail by an offset of +1.This validation runs after signing as part of this target.
Example output from build with signing enabled:
I think that the solution here is to either 1) skip the test when signing or 2) modify the test to increase the expected number of files by one when signing.