Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1148881

Browse files
AlexTroshkinbrettfo
authored andcommitted
fix build.cmd faildotnet#4659 (dotnet#4660)
* Use vswhere for find VS150COMNTOOLS* fix nested parentheses* Changes after review: call vswhere only when %VS150COMNTOOLS% is not set
1 parent20b6f6b commit1148881

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

‎build.cmd‎

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -502,26 +502,13 @@ echo TEMP=%TEMP%
502502
:: If this is not set, VsDevCmd.bat will change %cd% to [USERPROFILE]\source, causing the build to fail.
503503
SETVSCMD_START_DIR=%cd%
504504

505-
:: try to find an RC or RTM edition of VS2017
506-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" (
507-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
508-
)
509-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" (
510-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
511-
)
512-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" (
513-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
505+
:: Try find installation path of VS2017 with vswhere.exe
506+
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\" (
507+
for /f"usebackq delims="%%iin (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -property installationPath`)dosetVS_INSTALLATION_PATH=%%i
514508
)
515509

516-
:: Allow build from Preview editions
517-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat" (
518-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat"
519-
)
520-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Professional\Common7\Tools\VsDevCmd.bat" (
521-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat"
522-
)
523-
if"%VS150COMNTOOLS%"EQU""ifexist"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Community\Common7\Tools\VsDevCmd.bat" (
524-
call"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat"
510+
if"%VS_INSTALLATION_PATH%"NEQ"" (
511+
call"%VS_INSTALLATION_PATH%\Common7\Tools\VsDevCmd.bat"
525512
)
526513

527514
:: If there's no installation of VS2017 or VS2017 Preview, use the build tools

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp