6
votes

I modified my VS2010 project in VS2012, and now when I move back to VS2010, it shows:

"error MSB8008: Specified platform toolset (v110) is not installed or invalid. .lease make sure that a supported PlatformToolset value is selected."

But the problem I have already changed the PlatformToolset from v110 to v100 via Project--> Property--> Configureation ..--> General --> PlatformToolset : v100

The error message still there after I compiling the projects again. I was confused. Could anyone knows what the problem is now? Thanks!

2
Hard to see how this could go wrong. Open the .vcxproj file in Notepad. Verify that the ToolsVersion at the top of the file is reset back from 11.0 to 10.0 and that you indeed see the <PlatformToolset> element set to "v100". And compare it with another .vcxproj file you created with VS2010. - Hans Passant
I am getting this error too. I confirmed that PlatformToolset is set to v100 in my .vcxproj file. Yesterday I moved my AppData/local to a different drive (via the folder properties "Move..." button on the Location tab) -- is it possible that somehow is related? I never opened my project in 2012, but I am using version control so it is possible I pulled in someone else's change that mistakenly upped the version, but I can find no configuration reference to 110. - JDiMatteo
It turns out that one of my referenced projects had the wrong toolset. (My AppData/Local move had nothing to do with it.) - JDiMatteo

2 Answers

3
votes

The toolset error could be caused by a referenced project. You can find the culprit by doing the following:

  1. Increase the build verbosity level to diagnostic: Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity > Diagnostic
  2. Disable mulithreaded builds so log entries are sequential and thus easier to read: Tools > Options > Projects and Solutions > Build and Run > maximum number of parallel project builds > 1
  3. Build just the single project that is giving the build error: right click the project X in Solution Explorer > Project Only > Build Only X
  4. When the build finishes, locate the error in the output and look at the previous few lines to identify the referenced project causing the error

For example, if you are building project X you might get the following error showing that referenced project FooBar.vcxproj specifies the toolset as v110 causing the error:

Target "PlatformPrepareForBuild: (TargetId:114)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets" from project "D:\Foo\Bar\FooBar.vcxproj" (target "PrepareForBuild" depends on it):

Using "VCMessage" task from assembly "Microsoft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03d5f8f12d50a3a".

Task "VCMessage" (TaskId:63)

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(514,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.

After resolving the problem, be sure to put back the build output verbosity to normal and revert any change to the number of parallel project builds.

0
votes

May be this information will usefull. I've had the same problem. But the fault was the LIB file, compiled with v110 toolset, not referenced project. My project toolset was v100. And it was really mind-breaker to find out what's wrong.