加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
msbuild.cmd 941 Bytes
一键复制 编辑 原始数据 按行查看 历史
@REM check and set Visual Studio environment
rem There is vswhere.exe starting VS2017U2
if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
rem Use %ProgramFiles% in a 32-bit program prior to Windows 10)
If Not Exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"
If Not Exist "%VSWHERE%" (
echo "WARNING: Can't find vswhere.exe. It is a part of VS 2017 version 15.2 or later. Trying known path..."
set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
) ELSE (
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
set InstallDir=%%i
)
)
echo Install dir is "%InstallDir%"
if exist "%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" (
set msbuild="%InstallDir%\MSBuild\Current\Bin\MSBuild.exe"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化