Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ function BuildSolution {
test_runtime_args="--debug"
fi

local msbuild_warn_as_error=""
if [[ "$warn_as_error" == true ]]; then
msbuild_warn_as_error="/warnAsError"
fi

local generate_documentation_file=""
if [[ "$skip_documentation" == true ]]; then
generate_documentation_file="/p:GenerateDocumentationFile=false"
Expand All @@ -292,11 +297,6 @@ function BuildSolution {
roslyn_use_hard_links="/p:ROSLYNUSEHARDLINKS=true"
fi

# Setting /p:TreatWarningsAsErrors=true is a workaround for https://github.com/Microsoft/msbuild/issues/3062.
# We don't pass /warnaserror to msbuild (warn_as_error is set to false by default above), but set
# /p:TreatWarningsAsErrors=true so that compiler reported warnings, other than IDE0055 are treated as errors.
# Warnings reported from other msbuild tasks are not treated as errors for now.

MSBuild $toolset_build_proj \
$bl \
/p:Configuration=$configuration \
Expand All @@ -312,13 +312,14 @@ function BuildSolution {
/p:RunAnalyzersDuringBuild=$run_analyzers \
/p:BootstrapBuildPath="$bootstrap_dir" \
/p:ContinuousIntegrationBuild=$ci \
/p:TreatWarningsAsErrors=true \
/p:TreatWarningsAsErrors=$warn_as_error \
/p:TestRuntimeAdditionalArguments=$test_runtime_args \
/p:DotNetBuildSourceOnly=$source_build \
/p:DotNetBuild=$product_build \
/p:DotNetBuildFromVMR=$from_vmr \
$test_runtime \
$mono_tool \
$msbuild_warn_as_error \
$generate_documentation_file \
$roslyn_use_hard_links \
${properties[@]+"${properties[@]}"}
Expand Down
Loading