Save lastexitcode in make.ps1 Main function
@@ -58,6 +58,9 @@ $_FRAMEWORKS = @{
function Main([String] $target, [String] $configuration) {
msbuild Build.proj /m /t:$target /p:BuildFlavour=$configuration /verbosity:minimal /nologo /p:Platform="Any CPU" /bl:build-$target-$configuration.binlog
+
+ # Use the exit code of msbuild as the exit code for this script.
+ $global:Result = $lastExitCode
}
function Test([String] $target, [String] $configuration, [String[]] $frameworks) {
