我最近安装了 Visual Studio 2017,MSBuild.exe 不应该附带吗? bash 脚本之一正在调用它,但找不到任何内容。
这是 build.bat 中产生错误的部分(您可以看到整个文件here https://github.com/mpc-hc/mpc-hc/blob/develop/build.bat)
MSBuild.exe mpc-hc.sln %MSBUILD_SWITCHES%^
/target:%BUILDTYPE% /property:Configuration="%BUILDCFG% Filter";Platform=%1^
/flp1:LogFile=%LOG_DIR%\filters_errors_%BUILDCFG%_%1.log;errorsonly;Verbosity=diagnostic^
/flp2:LogFile=%LOG_DIR%\filters_warnings_%BUILDCFG%_%1.log;warningsonly;Verbosity=diagnostic
IF %ERRORLEVEL% NEQ 0 (
CALL "%COMMON%" :SubMsg "ERROR" "mpc-hc.sln %BUILDCFG% Filter %1 - Compilation failed!"
EXIT /B
) ELSE (
CALL "%COMMON%" :SubMsg "INFO" "mpc-hc.sln %BUILDCFG% Filter %1 compiled successfully"
)
You can use vswhere
1 which comes with Visual Studio 2017
.
It is located in "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
.
路径的一部分MSBuild.exe
然后通过检索vswhere -nologo -latest -property installationPath
,这导致例如C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
。
根据您要使用的 msbuild 版本,您现在可以猜测路径的其余部分:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\VERSION\Bin\MSBuild.exe
where VERSION例如,15.0
对于版本installationVersion: 15.3.26730.12
正如所计算的"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationVersion
.
1 See GitHub https://github.com/Microsoft/vswhere
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)