vswhere在更新到Visual Studio 2017版本15.8.1后找不到MSBuild

时间:2018-08-23 20:12:56

标签: visual-studio batch-file msbuild

我正在使用vswhere查找一些.bat脚本的MSBuild安装路径。在我升级到Visual Studio 2017的15.8.1版本之前,此方法一直很好。

现在它变成空的。这是我的.bat脚本:

for /f "usebackq tokens=1* delims=: " %%i in (`..\Tools\vswhere.exe -latest -requires Microsoft.Component.MSBuild`) do (
     if /i "%%i"=="installationPath" set InstallDir=%%j)

echo %InstallDir%\Common7

具有以下输出:

\Common7

还有其他人看到过这个问题吗?我试图将vswhere.exe文件更新为与Visual Studio最新版本一起安装的文件,但仍然没有成功。我正在运行Windows 10。

1 个答案:

答案 0 :(得分:1)

更新到V 15.8.2后解决了我的问题。安装15.8.1版时,可能出了点问题。