2

I have a MFC (Visual C++) project that was created on Visual Studio 2008. The project compiles fine with VS 2010.

When I'm trying to compile the project with VS 2012, a message box pops-up that says:

The operation could not be completed

I changed the Platform Toolset version to Visual Studio 2012, but still I got the same error.

When I tried to compile the project with the MSBuild CLI, I get the following error:

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

Now, here is the funny part:

if I change the Platform Toolset version back to VS 2010 - the MSBuild CLI compiles it with no problem!

So, why does VS 2012 can't act the same?

Werner Henze
  • 16,404
  • 12
  • 44
  • 69
Orad SA
  • 1,885
  • 5
  • 16
  • 16
  • http://stackoverflow.com/questions/10245771/sharing-a-c-solution-between-visual-studio-2010-and-11 – SomeWittyUsername Nov 11 '12 at 07:40
  • If I change the Platform Toolset version to v100, VS 2012 still act the same - telling me that "The operation could not be completed" when I try to build the project. Again, this is only from the VS ui - if I build the project from msbuild command-line, the build completed with no errors. – Orad SA Nov 11 '12 at 13:02
  • The msbuild CLI won't compile it because by default it will select the VC2010 compiler for a vcxproj. If you ask msbuild to build the .sln file, then it will use the VC2012 compiler. The thing that triggers it is the "Visual Studio 2012" line at the top of the .sln file – Orion Edwards May 30 '13 at 21:56

1 Answers1

0

When you open the VS2008 or VS2010 project with VS2012, it will notify you update to new platform, make sure you have updated them into VS2012, and

  1. Select v110 (by defalut)

  2. check "SDL checks", if 'yes', many VS2010 code will be wrong in VS2012. if so, you need update your code, or change it to 'no'

  3. Rebuild (not build)

Jacky Zhou
  • 23
  • 1
  • 9