diff --git a/build/templates/package-validation.yml b/build/templates/package-validation.yml index e4e29c266..26ea84e57 100644 --- a/build/templates/package-validation.yml +++ b/build/templates/package-validation.yml @@ -75,7 +75,7 @@ steps: cd UnoApp1 - & dotnet build UnoApp1.sln "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true + & dotnet build UnoApp1.sln "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507 if ($LASTEXITCODE -ne 0) { throw "Exit code must be zero." diff --git a/build/templates/template-validation.yml b/build/templates/template-validation.yml index a8c2ae742..c5b76a638 100644 --- a/build/templates/template-validation.yml +++ b/build/templates/template-validation.yml @@ -63,11 +63,11 @@ steps: if ('${{ parameters.templateName }}' -eq 'unoapp-uwp') { $msbuild = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe - & $msbuild /r "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true + & $msbuild /r "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507 } else { - & dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true + & dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507 } if ($LASTEXITCODE -ne 0)