Skip to content

Commit

Permalink
ci: enable warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Aug 23, 2024
1 parent d713aae commit e5d0cb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/templates/package-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ steps:
{
# Build the app
pushd $testName
& dotnet build $testName.sln "/bl:$(System.ArtifactsDirectory)/$testName.$(Agent.OS).$dotnetVersion.binlog"
& dotnet build $testName.sln "/bl:$(System.ArtifactsDirectory)/$testName.$(Agent.OS).$dotnetVersion.binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
if ($LASTEXITCODE -ne 0)
{
echo "Build failed for $testName"
Expand Down
4 changes: 2 additions & 2 deletions build/templates/template-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
& $msbuild /r "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
}
else
{
& dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
& dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
}
if ($LASTEXITCODE -ne 0)
Expand Down

0 comments on commit e5d0cb9

Please sign in to comment.