How to install Visual Studio Build Tools 2010 on Visual Studio 2015 Community?
Asked Answered
E

2

22

I have a project created on Visual Studio 2010. When I try to run the project on Visual Studio 2015 Community edition I get the error below,

Severity Code Description Project File Line Error MSB8020 The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 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". graphics C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets 55

And when I tried to build it with Visual Studio 2015 Build Tools I encountered about 1500+ errors.

enter image description here

Is there any way to make the project work?

Eisenberg answered 19/1, 2016 at 19:23 Comment(2)
Reinstalled and everything works well!Eisenberg
Hi I am having the same issue, did you get it to work?Brnaba
C
26

If you can't install VS2010, Windows SDK for Windows 7 contains needed compiler tools (v100), you may actually skip installing the SDK itself and install only the compiler tools, headers and libs. Please note, that the compiler included in Windows SDK is the same that VS2010 has, but VS2010 SP1 has a bit newer compiler. If you need that, you'll also need to install Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1. But be aware, that if you install these, you may have issues later if you decide to install VS2010, there are bugs in installer that requires you to install components in strict order. Also, if your code uses MFC or ATL you must install VS2010, installing Windows SDK will not be enough.

Convert answered 19/1, 2016 at 20:21 Comment(9)
There are also some known installer bugs with the Windows SDK for Windows 7.1. Be sure to see KB 2717426.Restharrow
@ChuckWalbourn I'm not sure MFC/ATL from VS2015 could be used with v100 compiler tools.Convert
No, but if they upgrade to VS 2015, then they will have MFC/ATL. That was my point. Really trying to use VS 2010 these days is a monstrous pain with all the caveats, the limits of the old Express editions, the major differences in Windows SDKs and C++ language support, etc. Better to just take the pain of upgrading now because it will only get worse as time goes on.Restharrow
I agree that upgrading compiler is always preferable, but it's not always possible. I don't know the OP's project structure, but if there are 3rd party libraries used, the VS2015 versions need to be rebuilt/aquired from vendor, and depending on the number of such libraries it may be much easier/cheaper to just use VS2010 tools.Convert
I tried this with VS 2013 and could not get it to work. After successful installation of Windows SDK 7.1 (which was a major pain), VS 2013 could not find the toolset v100 (CL.exe exited with code -1073741515). I had to change the Platform Toolset in project properties to Windows7.1SDK, but then, the project is broken for those with VS 2010 only.Meaghanmeagher
@Meaghanmeagher Did you install VC++ 2010 SP1 Compiler Update for Windows SDK 7.1?Convert
Yes, I did install it from the VC-Compiler-KB2519277.exe downloaded from the source your answer links to.Meaghanmeagher
Now I found that even with toolset set to Windows7.1SDK, the error with CL.exe being unable to locate needed DLLs occurs, unless I add their directory to Path. Probably just another bug in the installer of the SDK -- probably, it expects that VS 2010 installer has already added that path.Meaghanmeagher
@Meaghanmeagher I had the same problem. To quote a SO comment (Hans Passant, https://mcmap.net/q/588336/-cl-exe-exit-codes/1723823) "-107374151 == 0xC0000135 == STATUS_DLL_NOT_FOUND, "The program can't start because a DLL is missing from your computer"". I then ran cl.exe (in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin) directly and it spit out an error saying it was missing "mspdb100.dll", which is in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE". Copying that over fixed the problem. Not elegant, but it works!Equalitarian
R
10

You either install VS 2010 and build your project, or better yet you upgrade your projects. The VS 2015 custom install options will let you install the v120 Platform Toolset, but not the v110 or v100 Platform Toolsets.

One major change in VS 2015 is that the C++ tools (i.e. v140) are not installed by the Typical installation option. See the Visual C++ Team Blog.

Keep in mind that Visual C++ 2010 used the C++0x Draft Standard, and Visual C++ 2015 meets the C++11 Standard with the exception of Expression SFINAE (which is partly there in Update 1), so quite a bit has changed in the intervening years including some breaking changes. Since you are jumping three major releases at once--and about 10 minor updates--, it can be a bit overwhelming especially working through all the new warnings.

Another thing to keep in mind is that Visual C++ 2010 used the Windows 7.1 SDK, while Visual C++ 2012 or later use the Windows 8.x SDK. There's been a lot of change there too particularly for DirectX development. It's particularly important for Windows desktop apps that you set the _WIN32_WINNT preprocessor define for your target platform as the Windows 8.x SDK does not default to the 'oldest supported platform' like earlier Windows SDKs did. See Using the Windows Headers

VS 2010 and the v100 toolset supports targeting Windows XP and Windows Server 2003. The v140 toolset does not support targeting Windows XP / Server 2003. You have to use v140_xp Platform Toolset instead. See this post for some notes as this means you are again using the Windows 7.1 SDK rather than the Windows 8.x SDK with the _xp toolsets.

See Breaking Changes in Visual C++ 2012, Breaking Changes in Visual C++ 2013, and Breaking Changes in Visual C++ 2015.

See also Support For C++11/14/17 Features (Modern C++), and Where is the DirectX SDK?.

If you need to build the code both with VS 2010 and with VS 2015, then you should create two projects/solution files, one for each. You may also want to read this article for some notes on writing code that can build with multiple Visual C++ toolsets, which again is particularly challenging due to the Windows SDK changes.

VS 2015 supports targeting Windows Vista SP2, Windows 7 SP1, Windows 8.0, Windows 8.1, Windows 10, and optionally Windows XP SP3. It does not support targeting Windows Vista RTM, Windows Vista SP1, or Windows 7 RTM.

Restharrow answered 19/1, 2016 at 20:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.