Download the VS 2017 Build Tools (for C++ or managed code)
Recap of the Visual C++ and Build Tools
Last year we introduced the Visual C++ 2015 Build Tools to enable a streamlined build-lab experience for getting the required Visual C++ tools without the additional overhead of installing the Visual Studio IDE. We expanded the options to include tools like ATL and MFC, .NET tools for C++/CLI development, and various Windows SDKs. There was also an MSBuild standalone installer for installing the tools needed for building .NET applications called the Microsoft Build Tools 2015.
The new Visual Studio Build Tools
For Visual Studio 2017 RC, we are introducing the new Visual Studio Build Tools which uses the new installer experience to provide access to MSBuild tools for both managed and native applications. This installer replaces both the Visual C++ Build Tools and the Microsoft Build Tools as your one stop shop for build tools. By default, all of the necessary MSBuild prerequisites for both managed and native builds are installed with the Visual Studio Build Tools, including the MSBuild command prompt which you can use to build your applications. On top of that there is also an optional workload for the “Visual C++ Build Tools” that provides an additional set of options that native C++ developers can install on top of the core MSBuild components.
These options are very similar to those found in the Visual Studio 2017 RC “Desktop development with C++” workload, which provides a comparable set of options to those available in the Visual C++ Build Tools 2015. Note that we also include CMake support in the Visual Studio Build Tools.
Just like the installer for Visual Studio 2017 RC, there is also an area for installing individual components to allow for more granular control over your installation.
Command-line “Silent” Installs
The build tools can be installed using the installer from the command-line without needing to launch the installer UI. Navigate to the installer’s directory using an elevated command prompt and run one of the following commands. There is also an option to use the “–quiet” argument to invoke a silent install if desired, as shown below:
- To install just the MSBuild tools
vs_buildtools.exe –quiet
- To install the MSBuild tools and required VC++ tools
vs_buildtools.exe –quiet –add Microsoft.VisualStudio.Workload.VCTools
- To install the MSBuild tools and recommended (default) VC++ tools
vs_buildtools.exe –quiet –add Microsoft.VisualStudio.Workload.VCTools –includeRecommended
- To install the MSBuild tools and all of the optional VC++ tools
vs_buildtools.exe –quiet –add Microsoft.VisualStudio.Workload.VCTools –includeOptional
The –help command will be coming in a future release. In the interim, the full set of command-line parameters to the Visual Studio installer is documented here: https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
Closing Remarks
Give the new Visual Studio Build Tools a try and let us know what you think. We plan to evolve this installer to continue to meet your needs, both native and beyond. Your input will help guide us down this path. Thanks!
Where is Windows XP support?? We need this.
Support for Windows XP targeting is coming soon.
Can you expand a bit on what the C++/CLI check box installs over and above the standard C++ compiler stuff.
This contains the .NET 4.6 SDK and the C++/CLI project project system integration and the project templates. If you already have 4.6 installed, then the extra amount of stuff is only around 26 MB.
This is great news, especially the -quiet option, which we need to get compilers installed on our CI infrastructure. Can you please document the exact options that are available via the -add option?
Another question – are you going to support offline installation? Since it didn’t seem to be supported for the 2015 tools, what I would do is to perform an installation on a clean VM, and then copy out the contents of the ProgramData\Package Cache directory. Then, inside a scripted install, I would “pre-seed” the target machine with all of those cached packages. This works well enough for the 2015 Build Tools, but it would be great to have an officially supported method, going forward. I find it important to get developer and CI machines up and running fast. On Linux it’s as simple as “apt-get install clang”, and I think Microsoft ought to strive for the same simplicity.
We well soon be updating this documentation list the full command-line capabilities:
https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
The offline installation option documentation can be found here:
https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio
With an offline install of VS Enterprise 2017, using the –add Microsoft.Component.MSBuild parameter still results in ‘Visual Studio core editor’ being selected for install, even though all I want is MSBuild (total install 931MB!). Is there a separate offline installer just for the Build Tools? My build server has no internet access.
You can create an offline installation for the Build Tools by following the directions on this page:
https://docs.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio
The name for the MSBuild workload is Microsoft.VisualStudio.Workload.MSBuildTools.
Please don’t forget the PCL Profiles – it’s a pain to have to copy individual profiles from a local machine to the build server to allow the build of a specific profile.
We are looking into how to support PCL profiles in the build tools.
Hello,
I downloaded the Build Tools for Visual Studio 2017 RC for the first time to give it a try.
Question: What is the purpose of including the Visual Studio wizards within the Build Tools for Visual Studio 2017 RC. I found .vsz and .vsdir files under the VC folder. Can we use theses wizards from the command-line?
Thanks,
We will be removing these remnant components in a later release.
I get the following errors with ;includeRecommeneded
PS C:\data\vs2017> .\vs_buildtools.exe –quiet –add Microsoft.VisualStudio.Workload.VCTools;includeRecommend
includeRecommended : The term ‘includeRecommended’ is not recognized as the name of a cmdlet, function, scr
or operable program. Check the spelling of the name, or if a path was included, verify that the path is cor
try again.
At line:1 char:73
+ … quiet –add Microsoft.VisualStudio.Workload.VCTools;includeRecommended
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (includeRecommended:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Also, –quiet does not seem to be quiet. It still brings up a GUI on my desktop. It appears that the –quiet install fails completely when I run inside the windowsservercore Docker image.
The instructions I shared had a mistake in them so I have updated the post. Please use the following syntax:
vs_buildtools.exe –quiet –add Microsoft.VisualStudio.VCTools –includeRecommended
The gui still comes up on my desktop. Trying to install inside a windowsserver core docker image, docker build never returns,
I am running in my Dockerfile,
RUN /app/build/vs_buildtools.exe –quiet –add Microsoft.VisualStudio.VCTools –includeRecommended
Blocked on this. Appreciate the help.
Thanks for the feedback, we will investigate why this is not working as expected on Docker containers.
Any update on this?
We’re still looking into this. You can find more details on this issue being discussed here: https://developercommunity.visualstudio.com/content/problem/81514/2017-build-tools-fails-to-install-on-windows-serve.html
One suggestion that seemed to work for some folks is to use Windows Server Core ’10.0.14393.1480’ instead of the latest (1590+).
$(VsInstallRoot) is empty
as such $(MSBuildToolsRoot) is missing the root folder and looks like: \MSBuild
and so on
If visual studio build tools are installed on their own then all builds using extensions fail because $(MSBuildExtensionsPath) is also “\MSBuild”
Problem seems to be here:
GetVsInstallRoot() will report no visual studio installed completely missing the fact that build tools are installed.
Hi Calin—
Thanks for making us aware of this issue. It appears to be a problem with our discover VS folder code. We have created an issue on our GitHub to track its progress: https://github.com/Microsoft/msbuild/issues/1418
Please let us know if you run into any other issues.
Sarabeth
<property name=”VsInstallRoot” value=”$([MSBuild]::GetVsInstallRoot())” />
Love the concept!
For future readers my I recommend my VS 2017 Installation detection scripts https://github.com/node4good/get-vs2017-path for when you want to find out the path to the VS 2017 buildtools installation. The scripts use only built-in windows tools with no dependencies.
Hi I was trying to build powershell script to automate the process of setting up the build machine.
But the vs_buildtools.exe when invoked from script suddenly exits.
It the Event Viewer I can see the message:
The program or feature “\??\C:\Users\Administrator\Documents\vs_buildtools.exe” cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available.
Where can I report this?
Are the build tools free or do they require a full VS license?
The build tools are a supplement to VS and thus require a valid VS license. But VS Community is free for most. See the downloads page for details: https://www.visualstudio.com/downloads/
Is VS c++ build tools compatible with
a)Windows 10
b)Windows 8 or 8.1
c) Windows 7
Please help me :D