diff --git a/build-test.cmd b/build-test.cmd index 56527bd397b7..7da18071366b 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -9,7 +9,7 @@ set __BuildOS=Windows_NT :: Define a prefix for most output progress messages that come from this script. That makes :: it easier to see where these are coming from. Note that there is a trailing space here. -set __MsgPrefix=BUILDTEST: +set "__MsgPrefix=BUILDTEST: " :: Default to highest Visual Studio version available :: @@ -33,7 +33,7 @@ if defined VisualStudioVersion ( set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( @@ -123,8 +123,6 @@ if defined __BuildAgainstPackagesArg ( ) ) -:: echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat" -:: call "%__VSToolsRoot%\VsDevCmd.bat" @if defined _echo @echo on set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch% diff --git a/run.cmd b/run.cmd index 03f79cad4651..295604bbd0f3 100644 --- a/run.cmd +++ b/run.cmd @@ -23,11 +23,11 @@ if defined VisualStudioVersion ( set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( - echo Error: Visual Studio 2015 or 2017 required. + echo %__MsgPrefix%Error: Visual Studio 2015 or 2017 required. echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. exit /b 1 ) diff --git a/tests/runtest.cmd b/tests/runtest.cmd index c5aadfea7605..52a2e5e2fa1d 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -33,7 +33,7 @@ if defined VisualStudioVersion ( set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( @@ -159,10 +159,6 @@ if not exist "%__VSToolsRoot%\VsDevCmd.bat" goto NoVS :: Does MSBuild really exist? if not exist %_msbuildexe% echo %__MsgPrefix%Error: Could not find MSBuild.exe. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1 -:: Set the environment for the build- VS cmd prompt -:: echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat" -:: call "%__VSToolsRoot%\VsDevCmd.bat" - if not defined VSINSTALLDIR ( echo %__MsgPrefix%Error: runtest.cmd should be run from a Visual Studio Command Prompt. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. exit /b 1 @@ -331,7 +327,7 @@ if %__exitCode% neq 0 ( exit /b 0 ) -echo Successfully precompiled %2 +echo %__MsgPrefix%Successfully precompiled %2 exit /b 0 :jitdisasm @@ -385,7 +381,7 @@ set __msbuildLogArgs=^ set __msbuildArgs=%* %__msbuildCommonArgs% %__msbuildLogArgs% @REM The next line will overwrite the existing log file, if any. -echo %_msbuildexe% %__msbuildArgs% +echo %__MsgPrefix%%_msbuildexe% %__msbuildArgs% echo Invoking: %_msbuildexe% %__msbuildArgs% > "%__BuildLog%" %_msbuildexe% %__msbuildArgs%