Visual studio (2017) build tools 150 - visual-c++

When I try to compile some C++ code I get the error
Code:
MSB8020
Description:
The build tools for v150 (Platform Toolset = 'v150') cannot be found.
To build using the v150 build tools, please install v150 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by
selecting the Project menu or right-click the solution, and then
selecting "Retarget solution".
I cannot select "Retarget solution" as there is no such.
I have opened the Visual studio installer but the latest toolset there is 141.
How do I downgrade the build tools requirement or how do I "Retarget solution"?
TL;DR
I got into this situation by trying to compile Autohotkey_L. I did it totally clean by installing a HyperV virtual machine and downloading the dev machine Microsoft has provided. It already contains a Visual studio 2017 community edition. It can't get more clean or more latest than that.

You are using Visual Studio 2017 with 141 toolset by default (you can also install v140 additionally). v150 will be probably available in the future versions, that's why you can still select it in the Toolsets.
The issue is when toolset is not selected, it is trying to use the highest version for your visual studio version without looking at if the toolset is installed or not. As 150 is not available yet, you can't use it.
In order to fix it, right click on the projects (not solutions!), you should have 2 for your example, go Properties -> select Configuration-All configurations -> General -> Platform toolset -> select v141 (as you should have it by default) -> OK. Perform it with a second project you have as well.
Here is how it looks like:

Related

Pip error even Microsoft Visual C++ 14.0 is installed

I read all of the questions and answers which are related or asked before and I still didn't find an appropriate answer to my problem.
I am using python 3.6.5 and pip(and setuptools) is up to date.
I am installed Microsoft Visual C++ Redistributable for Visual Studio 2017 from here:
https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
when using pip install, I still get the error:
Microsoft Visual C++ is required
PS: I want to install airflow
This problem was solved on a computer having Visual Studio Community 2017 v15.5.2 and the Visual Studio Installer v1.16.1247.518 installed.
The steps used are as follows:
Start the Visual Studio Installer
Visual Studio Installer showed a Installed section that stated that Visual
Studio Community 2017. In that section was a drop-down titled More. The drop-
down option Modify was selected.
Visual Studio Installer then showed "tabs" titled Workloads, Individual
components, Language packs and Installed locations. The tab "Individual components" was selected.
Scrolling down the list of Individual components, there was a section titled
Compilers, build tools, and runtimes. Under that section there was a VC++
2015.3 v140 toolset for desktop (x86,x64) option that was unchecked. The
option was then checked.
The Modify button located at the lower right part of the Visual Studio
Installer was pushed.
After waiting an unreasonably long amount of time, the installer finished
modifying the installation of Visual Studio Community 2017.
As always, your mileage may differ.
As per instructions here: https://www.scivision.co/python-windows-visual-c++-14-required/
Use vs_buildtools.exe and install only the windows 10 SDK.
Visual C++ Redistributable installs run-time libraries and can be used to run applications written with VC. But you need Visual C++ compiler! So install Build Tools.
I suggest using MinGW as the C compiler.

How to enable Web Development feature in Visual Studio 2015?

I am trying to install Microsoft Azure SDK. I downloaded this version (2.9) of the SDK from here. And I am getting the following error in the picture.
I have Visual Studio 2013 and 2015 installed on my PC. Could it be some sort of compatibility issue. I read on some forum that it won't work if I have different versions of the Azure SDK installed on Visual Studio 2013 and 2015.
But I don't have the SDK installed on any of them. And I can't seem to find any Web Development Feature in the IDE either. Does anyone know how to resolve this?
Given the situation, the issue is most probably that the relevant modules for Web Development weren't installed when Visual Studio was installed. Those modules are not selected to be installed by default.
The solution is to simply re-run the setup and select "Modify".
On the list of modules, go to "Windows and Web Development".
You should get Microsoft Web Developer Tools in the list. Just select that and install. That should do the trick.
#alchemist is right but I had deleted the VS2015 installer long ago (right after installing). So I went to the Control Panel > Programs And Features > Microsoft Visual Studio 2015 Community with Updates > (right-click) > Change
This will bring up the visual studio installer. Click on Modify > Check Microsoft Web Developer Tools > Update.
*walks towards the camera in slow motion on an exploding background

Compiling with Visual Studio 2012 tools through Visual Studio 2015

I have a lot of developers currently using Visual Studio 2012 and I would like to upgrade them to 2015 in two stages. First upgrade to Visual Studio 2015, then upgrade to the new MSBuild (compiler) toolset. This is important because I would like builds in Visual Studio to use the same toolset as builds in our build scripts, which are available on developer machines and used by the build servers. I would like to avoid picking a day and telling every developer to install Visual Studio 2015, and simultaneously pushing changesets to our repositories/branches to update the build scripts all at once.
From my understanding, the ToolsVersion attribute of the Project element in the project file drives the distinction between MSBuild versions. However, when building a project with ToolsVersion=4.0 in Visual Studio 2015, I receive the following messages:
Building with tools version "14.0".
Project file contains
ToolsVersion="4.0". This toolset may be unknown or missing, in which
case you may be able to resolve this by installing the appropriate
version of MSBuild, or the build may have been forced to a particular
ToolsVersion for policy reasons. Treating the project as if it had
ToolsVersion="14.0". For more information, please see
http://go.microsoft.com/fwlink/?LinkId=293424.
In addition to that, I can follow the build output and see that it is in fact using the Visual Studio 2015 toolset to compile the code. I know the "4.0" toolset is not missing (I have Visual Studio 2012 installed, along with the .NET Framework versions that include that version of MSBuild), so I'm assuming either Visual Studio 2015 can't find it, or there is a "policy reason" I don't understand.
According to the MSDN page for Standard and Custom Toolset Configurations, MSBuild 12.0 (Visual Studio 2013) includes the 4.0 toolset. However I can't find any information on MSBuild 14.0 (Visual Studio 2015).
Is it possible to build in Visual Studio 2015, but use the Visual Studio 2012 toolset? If so, how? And what are the "policy reasons" mentioned in the build warning?
Solution
Have your developers set the environment variable MSBUILDDEFAULTTOOLSVERSION to 4.0. One simple way to do this is to have them run open an elevated PowerShell prompt and run:
[Environment]::SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "4.0", "Machine")
Visual Studio will need to be reopened before it will pick up this change. Once you are ready to upgrade to the new MSBuild toolset, have your developers remove that environment variable:
[Environment]::SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "4.0", "Machine")
Background
From MSDN (emphasis mine):
Starting in Visual Studio 2013, the MSBuild Toolset version is the
same as the Visual Studio version number. MSBuild defaults to this
Toolset within Visual Studio and on the command line, regardless of
the toolset version specified in project file. This behavior can be
overridden by using the /ToolsVersion flag. For more information, see
Overriding ToolsVersion Settings.
Incidentally, to verify which MSBuild toolsets are available on a machine and where they are located, you can just open up PowerShell and run:
dir HKLM:\Software\Microsoft\MSBuild\ToolsVersions

Cannot find C++ project templates after installing Visual Studio 2015

After installing Visual Studio 2015, when I go to File -> New Project, I cannot find any project templates related to Visual C++. How can I get them?
You can do that by modifying the Visual Studio, and you can do that using these steps:
Go to Control panel
In the Add or Remove Programs dialog box, select the product you want to repair and then click Change/Remove
In the Setup wizard, click Next
Click Repair
Then Modify - now you can select C++ to add it.
Visual Studio 2015 has made a number of setup components optional. This means that the default installation set is very small and the user can select any additional components he wants to install. Visual C++ is one of the optional install components.
Most of the optional install components can also be acquired through regular product work-flows. For example, when you go to File -> New Project dialog and are not able to find any Visual C++ templates, you will at least see an item that allows you to acquire Visual C++ tools. It does this by launching the setup experience with the "Visual C++" tools pre-selected.
For more information, please see this link:
http://blogs.msdn.com/b/vcblog/archive/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers.aspx
You can add the missing templates by:
Go to File(in visual studio).
Select New project.
Under Templates Select Open Visual Studio Installer.
Now you can add any component.
Works on Visual Studio 2017.
Don't know about others.
If you have an MSVS update 3 installed then you may have face with one of the problem of this update. See more here Visual Studio 2015 Update 3 Known Issues. Here is a quote from this document
In some cases, applying Update 3 can cause the optional feature selections for Visual C++ (e.g. Common Tools for Visual C++ 2015) to become deselected and uninstalled.

Visual Studio 2012 Ultimate: error MSB8020:

i have Visual Studio 2012 Ultimate version 11.0.61030.00 update 4.
i try to compile with Daffodil toolset platform v60
enter link description here
but how fix this error?
Error 4 error MSB8020: The builds tools for v60 (Platform Toolset = 'v60') cannot be found. To build using the v60 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v60 to build using the v60 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets.
location files from Daffodil is:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v60
any help pls
ty.
Right click the project from the solution explorer, click properties, when it opens expand configuration properties and open the general tab.
Within there, there is a field called 'Platform Toolset' drop down the row next to it and choose the option that should have v60 in the title!
In order to use Daffodil in versions later than VS2010, you need the platform toolset of VS2010 installed AND the toolset you want to use, which is VS6. Have you installed both?
To use these platform toolsets, you must have the targeted version of Visual Studio installed. Currently supported pl
Visual Studio 2012/2013/2015
Daffodil works fine in VS 2012 and later versions as long as VS 2010 is also installed.
Source: https://daffodil.codeplex.com/

Resources