如何安装 VisualC + + 构建工具?

我需要安装 VisualC + + 构建工具。当我下载安装程序,我试图安装它,但它告诉我,我需要卸载 VS 2015!

我该怎么解决呢? 为什么 VisualC + + Build 工具告诉我它需要删除当前的 VS2015安装?

392031 次浏览

You can check Announcing the official release of the Visual C++ Build Tools 2015 and from this blog, we can know that the Build Tools are the same C++ tools that you get with Visual Studio 2015 but they come in a scriptable standalone installer that only lays down the tools you need to build C++ projects. The Build Tools give you a way to install the tools you need on your build machines without the IDE you don’t need.

Because these components are the same as the ones installed by the Visual Studio 2015 Update 2 setup, you cannot install the Visual C++ Build Tools on a machine that already has Visual Studio 2015 installed. Therefore, it asks you to uninstall your existing VS 2015 when you tried to install the Visual C++ build tools using the standalone installer. Since you already have the VS 2015, you can go to Control Panel—Programs and Features and right click the VS 2015 item and Change-Modify, then check the option of those components that relates to the Visual C++ Build Tools, like Visual C++, Windows SDK… then install them. After the installation is successful, you can build the C++ projects.

I had the same issue too, the problem is exacerbated with the download link now only working for Visual Studio 2017, and installing the package from the download link did nothing for VS2015, although it took up 5gB of space.

I looked everywhere on how to do it with the Nu Get package manager and I couldn't find the solution.

It turns out it's even simpler than that, all you have to do is right-click the project or solution in the Solution Explorer from within Visual Studio, and click "Install Missing Components"

I just stumbled onto this issue accessing some Python libraries: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools". The latest link to that is actually here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019

When you begin the installer, it will have several "options" enabled which will balloon the install size to 5gb. If you have Windows 10, you'll need to leave selected the "Windows 10 SDK" option as mentioned here.

enter image description here

I hope it helps save others time!

The current version (2019/03/07) is Build Tools for Visual Studio 2017. It's an online installer, you need to include at least the individual components:

  • VC++ 2017 version xx.x tools
  • Windows SDK to use standard libraries.

As of Jan 2022, here are direct, official links to Visual Studio Build Tools:

Visual Studio 2017 Build Tools: https://aka.ms/vs/15/release/vs_buildtools.exe
Visual Studio 2019 Build Tools: https://aka.ms/vs/16/release/vs_buildtools.exe
Visual Studio 2022 Build Tools: https://aka.ms/vs/17/release/vs_buildtools.exe

(aka.ms is a Microsoft domain)

Here is a link that will only install Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/

I have not tried on a system with Visual Studio though but at least it did not try to install gigabytes of stuff.

Sorry for stating what may be very obvious. But it will only work if you install the build tool that matches the version of Visual Studio you are working with. I am using VS Code (sorry if this info is irrelevant), and I got it to work by installing the build tool for VS Code, and setting up VS Code to work with C++ by following this official guide

Please refer below link before installing Visual C++ Build tools.

https://devblogs.microsoft.com/cppblog/setup-changes-in-visual-studio-2015-affecting-c-developers/

Download the respective Installer from here,

https://my.visualstudio.com/Downloads?q=visual studio 2015