Platform Toolset = 'v150' cannot be found - visual-c++

The problem described below was resolved by changing the Pipeline yaml. The Build.proj that was included had incorrect parameters. It was pilot error.
I have a VisualStudio 2017 solution which builds in VS, when I push the Branch to merge with a Microsoft Hosted Azure DevOps Git master, the pipeline fails saying Platform Toolset = v150 cannot be found. I cannot find Platform Toolset v150 anywhere.
The Platform Toolset used when it successfully builds on VS2017 is v141, and is v142 on VS2019. It builds as Release x64 on both VS2017 and 2019. Since v150 does not exist, I assume that this is some sort of unexplained error condition.
I don't know where to look for better clues about what failed.
Here is the error:
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): Error MSB8020: 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". [D:\a\1\s\xxxxxxxxxxxxxxx.vcxproj]
I have also run the build from the command line as:
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" build.proj /t:Build /verbosity:normal /fileLogger /fileloggerparameters:Append
and see the same "v150 cannot be found" error

Related

Unable to install Intel HAXM for Android Studio

Intel HAXM is a prerequisite for compiling Android Studio code. When I try to install it through the SDK manager, it downloads fine, but while installing, says:
HAXM installation failed. To install HAXM follow the instructions found at: https://software.intel.com/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows
So I did the same and downloaded the files from GitHub. I followed the instructions, but when I try to build the .sln file, there is another error:
Severity Code Description Project File Line Suppression State
Error MSB8020 The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.0 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". haxm-core C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 390
Please guide me what I should do. I would be grateful if someone can compile the file for me....
The message
Error MSB8020 The build tools for WindowsKernelModeDriver10.0
(Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found.
means you have not installed the Windows 10 WDK. But you don't need to compile it on your own, simply install the last version haxm-windows_vVERSION.zip .
You can also try Hyper-V Platform if you get HAXM issues.

MSBuild Tools 2017 with Azure SDK 2.9.6

Yep there are similar question out there, but they are not related to VS 2017:
Visual Studio Build - Azure 2.9 SDK
MSBuild MSB4096 error with Azure SDK 2.9.1
I've recently upgraded from VS 2015 to VS 2017. On my local dev computer everything works fine and the Azure application (with Azure SDK 2.9.6) builds and starts.
But on the TeamCity server (MS Build Tools 2017 - Tool version 15.0) I get the following error:
MSB4019: The imported project "C:\Program Files (x86)\Microsoft
Visual
Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\Windows
Azure Tools\2.9\Microsoft.WindowsAzure.targets" was not found. Confirm
that the path in the declaration is correct, and that the
file exists on disk.
The build server/MSBuild tries to find the Microsoft.WindowsAzure.targets in the directory:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\
But it is actually in the directory:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\[VisualStudioVersion]\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\
[VisualStudioVersion] can have the following values "Community", "Professional" ,"Enterprise"
Yes, I've the build tools installed (https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15 ).
Yes, I already copied the whole Windows Azure Tools folder to BuildTools\MSBuild\Microsoft\VisualStudio\v15.0, but then I get another error in my F# project:
MSB4057: The target "GetTargetFrameworkProperties" does not exist in
the project.
It seems like the new MS Build Tools 2017 doesn't work properly with Windows Azure. Are there any workarounds yet? Or is the only option to switch back to an older MSBuild?
The new standalone BuildTools currently don't support Windows Azure targets.
So if you want to use the new MSBuild 2017 with Azure SDK you have to install a full VS 2017 installation on your build server.
Note: You may have to restart the TeamCity (agents) in order to recognize the MSBuild path. After running a build you can see the used MSBuild paths in the tab 'parameters':
MSBuildTools15.0_x64_Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\[VS_VERSION]\MSBuild\15.0\bin\amd64
MSBuildTools15.0_x86_Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\[VS_VERSION]\MSBuild\15.0\bin
[VS_VERSION] can be Community, Professional or Enterprise
I still got the GetTargetFrameworkProperties error from the F# project, this was resolved by adding the flag:
/p:VisualStudioVersion=15.0
to the MSBuild task.
For more information see https://github.com/Microsoft/msbuild/issues/1888

Error MSB8020, changed build tools, still not working

I'm trying to install the ogre sdk for Visual Studio 2012 express as per these instructions, but when I try to build the ALL_BUILD project, I get this error:
Error 1 error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 44 5 Sample_VolumeTex
I looked into project properties and indeed the platform tool set was set to v140, and so I changed it to v110 but I'm still getting the same MSB8020 error. I also tried right clicking the solution, but there's no option to update vc++ projects. Can someone please help me figure out what's going on?

LNK1104 error when building node-gyp project in Visual Studio 2015

I've tried everything, I have the proper version of Python (Python27), Windows SDK 8.1 is installed, Visual C++ is also installed, but the build still fails. I'm using Visual Studio 2015 Community editor btw. When I try to execute node-gyp buildfrom cmd I get the following error:
> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v14
0') cannot be found. To build using the v140 build tools, either click the Proj
ect menu or right-click the solution, and then select "Update VC++ Projects..."
. Install v140 to build using the v140 build tools. [C:\Users\Programming PC\Do
cuments\GitHub\node-addon-examples\1_hello_world\node_0.10\build\hello.vcxproj]
This error prompted me to go into to Visual Studio and see if the project can at least build and run from there, it doesn't.
Please help I looked at all of the other questions pertaining to this issue but none of their solutions have helped me.
Took a lot of research but I found the solution(s). First, to get rid of the MSB8020 error either add the VisualStudioVersion environment variable and set it to your version of visual studio or execute node-gyp build with this flag /p:VisualStudioVersion=14.0 (In my case).
I actually got different errors after I solved this one and I believe they are well worth mentioning.
Error MSB4175 then showed up, basically indicating that it cannot find Microsoft.Build.Tasks.v12.0.dll (Do a search on this .dll to find out where its usually located), copy and paste it to the path that it's looking for it in.
Now here is the kicker, the last error that interrupts node-gyp is because of a missing .lib file. Npm doesn't create the following file ...\.node-gyp\4.3.1\Debug\node.lib. So you need to go here and download a node.lib and mkdir Debug\ and put node.lib in there.
Afterwards node-gyp should build without errors.

Visual Studio 2012 platform toolset v110_xp

I'm trying to build a program using Visual Studio 2012. It's platform toolset property was set to 'v110_xp' but I changed it to 'v110'
Now I'm getting the error:
Error 2 error MSB8020: The builds tools for v110_xp (Platform Toolset = 'v110_xp') cannot be found. To build using the v110_xp build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v110_xp to build using the v110_xp build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 44
I already updated the VC++ Project and I also changed the platform toolset property to Visual Studio 2012 (v110) (it was originally set to v110_xp)
I also opened the .vcxproj file in another editor and manually changed it to use v110.
Does anybody know how to fix this error?
I updated Visual Studio 2012 to Update 4 and that seems to fix it.

Resources