21

My visual studio 2015 cannot build 2010 platform toolsets. It says:

The build tools for Visual Studio 2010 (v100) cannot be found. To build using the Visual Studio 2015 (v140) build tools, either click the Project menu or right-click the solution, and then select "Upgrade Solution...". Install Visual Studio 2010 (v100) to build using the Visual Studio 2010 (v100) build tools.

I do not want to upgrade my project or switch the toolset. I have visual studio 2010 installed. It builds the 2012 projects inside visual studio 2015 fine. 2012 also finds the 2010 build tools and builds 2010 projects fine.

Is there a visual studio setting where I can point it to the Visual Studio 2010 directory so that it correctly finds the build tools?

I have tried reinstalling 2010, 2012 and 2015 in that order.

tldr; Visual studio 2015 wont build 2010 projects even though I have visual 2010 installed.

Guilherme Fidelis
  • 1,022
  • 11
  • 20
marsh
  • 2,592
  • 5
  • 29
  • 53
  • Comment on downvote? – marsh Oct 14 '15 at 17:25
  • I had a similar issue recently. I can't find my notes on it right now, but I think the trick is to re-install VS 2010. – Austin Mullins Oct 15 '15 at 20:05
  • What project type are you building? class library, windows forms, etc? – laylarenee Oct 15 '15 at 20:16
  • A bunch of different things, dlls, libs, exe's. No windows forms though. – marsh Oct 15 '15 at 20:19
  • You need to change your toolset. This thread may help, its from VS2012, but might be relevant. http://stackoverflow.com/questions/15453629/use-visual-studio-2012-and-compile-with-older-platform-toolset – laylarenee Oct 15 '15 at 20:21
  • My Toolset is already on VS2010. As I said it is working in 2012 already. – marsh Oct 15 '15 at 20:28
  • Compare your machine with what you see in the "How does it work" section of [this blog post](http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx). If these two files cannot be found then you get this error. – Hans Passant Oct 15 '15 at 21:36
  • Reinstalling did not work. – marsh Oct 16 '15 at 21:20
  • @marsh Did you solve it? – Eric Omine Oct 23 '15 at 17:36
  • No, I have tried the suggestions with no avail. – marsh Oct 23 '15 at 17:46
  • On a random guess: Have you also enabled the xp support when installing VS2015? I don't know, why this should make a difference, but maybe there exist some strange dependencies for older toolsets – MikeMB Feb 08 '16 at 22:13
  • This mainly looks problem of build tools scripts [A] Please install **WindowsSDK** (NOT the latest one) [B] check files in folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\VXXX\Platforms\x64\PlatformToolsets\vxxx. resolve variable references. – Mandar Feb 09 '16 at 10:36
  • Can you test/debug the program in my anwser to this: http://stackoverflow.com/questions/14447742/list-available-platform-toolsets (change the project path to your project's path) and check what it says? You're probably missing some .target files, or directories – Simon Mourier Feb 09 '16 at 16:29
  • OK weirdly enough I have another solution building 2010 projects fine. It just seems to be solution? When selecting 2010 it says not installed on one solution but not the other? – marsh Feb 09 '16 at 21:48
  • Check my earlier comment. Available platform is defined per project. – Simon Mourier Feb 09 '16 at 23:21
  • The type or namespace name 'Build' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?). Could you provide full source instead of a snippet? I am not a c# developer and am unsure of what additional includes / setup I need. – marsh Feb 10 '16 at 14:48
  • @marsh - You need to add a reference to `Microsoft.Build` to be able to compile. PS: when you comment to someone, please make sure you use @ to make sure the user gets notified. I wasn't aware of your comment until I checked this post again. – Simon Mourier Feb 12 '16 at 09:39
  • @Simon Mourier I tried the Microsoft.Build already I still get that error. – marsh Feb 12 '16 at 19:40
  • @marsh - Maybe you're confusing add reference with add using statement? https://msdn.microsoft.com/en-us/library/wkze6zky.aspx the thing is MsBuild used in that tool is the build platform also used for C++ projects, so it's quite central now. And running the tool from VS is somewhat different than running it from command line... – Simon Mourier Feb 13 '16 at 06:32

2 Answers2

1

Install this service pack: https://www.visualstudio.com/news/vs2015-update2-vs

Fixed the issue for me. Released March 3, 2016 so it was unavailable at the time of posting.

marsh
  • 2,592
  • 5
  • 29
  • 53
0

according to this documentation from microsoft, the toolset is a per-project setting. So you need to change it for all of your VS2010 projects inside VS2015.

To change the project toolset

  1. In Visual Studio, in Solution Explorer, open the shortcut menu for your project (not for your solution) and then choose Properties to open your project Property Pages dialog box.

  2. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

  3. In the left pane of the dialog box, expand Configuration Properties and then select General.

  4. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you have installed the Visual Studio 2010 toolset, select Visual Studio 2010 (v100) to use it for your project.

  5. Choose the OK button.

does that help?

TabascoEye
  • 656
  • 5
  • 24