我installed Visual Studio Build Tools 2017 使用链接(位于底部的其他工具和框架下)安装两种工作负载:Visual C++ 构建工具和 Web 开发构建工具。我保留了默认文件夹。
基于相当多的文章,例如 Microsoft Web Application Targets is Missing ,我希望在文件夹中看到 vs_buildtools.exe:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin
文件夹,但没有。我看到了 MSBuild.exe,如您在此屏幕截图中所见。
这是安装程序的屏幕截图。
真的,有很多文章说的完全一样:1 , 2 , 仅举 2 个。
如何获取 vs_buildtools.exe?
显然,解决我的 Microsoft 引起的 Web 应用程序目标丢失问题的唯一方法是使用此可执行文件并运行 vs_buildtools.exe --add Microsoft.VisualStudio.Workload.WebBuildTools<,因为它不再出现在 15.0 中
作为 answer指定。我现在也很生气,应该有的东西没有。 Microsoft 是否在较新版本的构建工具中更改了某些内容?
最佳答案
How do I get vs_buildtools.exe?
您已经获得了 vs_buildtools.exe。
I installed the Visual Studio Build Tools 2017 using the link (at bottom under Other Tools and Frameworks) installing both workloads
您会注意到安装的文件名为vs_buildtools__339506979.1501125082.exe,名称中包含版本信息。您可以将其重命名为 vs_buildtools.exe,这就是您想要的。
vs_buildtools.exe 更新:
使用命令后:
vs_buildtools.exe --add Microsoft.VisualStudio.Workload.WebBuildTools
WebBuildTools 将安装在:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications
此外,请注意 answer 下的评论:
If you already have downloaded the "Build Tools for Visual Studio 2017" installer (visualstudio.com/thank-you-downloading-visual-studio/…), then you can launch that installer, hit Modify and tick the "Web development build tasks" workload module checkbox. Then click the Modify button and let the installer finish.
关于c# - Visual Studio Build Tools 2017 中缺少 vs_buildtools.exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45331976/