diff --git a/eng/build.sh b/eng/build.sh index fa217f24ec59..5bbb20c685c9 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -37,6 +37,7 @@ runtime_source_feed='' runtime_source_feed_key='' source_build='' product_build='' +warn_as_error=true if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -86,6 +87,7 @@ Options: --binarylog|-bl Use a binary logger --excludeCIBinarylog Don't output binary log by default in CI builds (short: -nobl). --verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] + --warnAsError Sets warnaserror msbuild parameter: 'true' or 'false' --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs @@ -259,6 +261,11 @@ while [[ $# -gt 0 ]]; do -productbuild|-product-build|-pb) product_build=true ;; + -warnaserror) + shift + [ -z "${1:-}" ] && __error "Missing value for parameter --warnaserror" && __usage + warn_as_error="${1:-}" + ;; *) msbuild_args[${#msbuild_args[*]}]="$1" ;;