108

I need to install Visual C++ Build Tools. When I've download installer, I've tried to install it, however it's telling me I need to uninstall VS 2015!

How can I solve it? Why is Visual C++ Build tools telling me it needs to remove current VS 2015 installation?

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
Jordi
  • 20,868
  • 39
  • 149
  • 333
  • 2
    You don't "need" to install it, you already have the necessary build tools. The package you downloaded is only interesting if you need to setup, say, a build server. Then again, we can't guess what "need" might mean. – Hans Passant Nov 09 '16 at 10:21

9 Answers9

95

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, and if you have Windows 11, you'll need to leave selected the "Windows 11 SDK" option.

enter image description here

I hope it helps save others time!

Aaron Belchamber
  • 1,480
  • 1
  • 16
  • 20
  • 1
    This currently links through to [Build Tools for Visual Studio 2017](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16), making this answer identical to [caiohamamura](https://stackoverflow.com/a/55053709/1048186)'s. – Josiah Yoder Jul 12 '19 at 17:18
  • 1
    Well, I guess if Microsoft later updated the link and someone later put in the new link my answer wasn't a duplicate at that time since his answer came 2 months later, right? – Aaron Belchamber Jul 12 '19 at 17:29
  • 11
    Link for the extra lazy -- https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16 – Simon Sep 26 '19 at 17:26
  • is it required to download Microsoft visual c++ build tools separately? like can we just download the "visual studio community 2019" and will that get rid of "MS Visual c++ 14.0 is required" error? – Nitish Prajapati Feb 09 '20 at 06:30
  • @NitishPrajapati No, as the "here" link in the answer states, you need to install Windows 10 SDK in addition. "C++ Buildtools" are offered as an optional installer inside "Visual Studio Community 2019", so you need the latter to install the former, and of the former you seem to need only the Windows 10 SDK. I cannot say this for sure as I read this too late and installed all of the auto-checked boxes of the C++ Buildtools. – questionto42 Aug 19 '20 at 21:51
  • If you have an ARM processor, you might have to install "2017 C++ ARM build tools" or "2017 C++ ARM64 build tools" – Abdalla Arbab Dec 10 '21 at 08:37
  • thanks for "Windows 10 SDK" tip. I was missing exactly that. – PAS Mar 23 '23 at 14:54
46

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.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Sara Liu - MSFT
  • 6,007
  • 1
  • 21
  • 27
31

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)

data
  • 2,563
  • 1
  • 21
  • 25
18

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.

For updated Windows 10 or Windows 11: use the new winget cli

Just copy and paste that command in cmd or powershell.

Windows 10 SDK

winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK"

Windows 11 SDK

winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000"
caiohamamura
  • 2,260
  • 21
  • 23
  • what is difference between "MS visual studio community 2019" and "MS visual c++ build tools" and will installing "MS visual studio community 2019 ide" suffice the need for visual build tools? I was working on python in pycharm and it gave me error "MS visual c++ 14 build tools required" something like that while installing python packages in pycharm ide – Nitish Prajapati Feb 09 '20 at 06:33
  • 1
    Python 2.7 will always try to use MS Visual C++ 14. Microsoft has even released a dedicated installer to provide [build tools for python](https://www.microsoft.com/en-us/download/details.aspx?id=44266). – caiohamamura Feb 10 '20 at 18:07
  • so can I assume that installing community ide will install build tools as well? – Nitish Prajapati Feb 10 '20 at 18:23
  • 1
    @NitishPrajapati the difference is that visual studio community will install the full IDE with all its dependencies, while build tools will only provide the necessary tools for building C/C++, .NET apps/libs from source code. So you if you are not a windows developer guy yourself (or dislike MS Visual Studio IDE), but you need to compile from source code you only need the build tools – caiohamamura Feb 10 '20 at 18:25
  • 2
    @NitishPrajapati it will, but as I said Python 2.7 needs the specific MS Visual C++ 14 version, it won't work out of the box with the 2019 version. – caiohamamura Feb 10 '20 at 18:26
3

For the latest Visual Studio 2022:

At any time after installation, you can install workloads or components that you didn't install initially. If you have Visual Studio open, go to Tools > Get Tools and Features... which opens the Visual Studio Installer. Or, open Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose Modify.

Source: https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170

SridharKritha
  • 8,481
  • 2
  • 52
  • 43
2

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.

Timothy C. Quinn
  • 3,739
  • 1
  • 35
  • 47
1

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"

Mi Po
  • 1,123
  • 2
  • 12
  • 21
0

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

EnTekker
  • 62
  • 10
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32063830) – Caspar V. Jun 26 '22 at 23:14
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 27 '22 at 15:37
  • Sorry for providing a bad link to begin with. Good point regarding linking in the first place. I will update my answer – EnTekker Aug 05 '22 at 12:13
0

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