4

I am trying to compile a project written in C++. The compiler gave me this error.

1>Project file contains ToolsVersion="12.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".

Can someone tell me How to resolve this error. I tried to update it but was unable to do so?

farhangdon
  • 2,003
  • 2
  • 21
  • 30
  • Maybe project you are trying to load was created at VS2013? VS2013 has compiler version 12.0, VS2012 - has version 11.0, and may not know about 12. – Arkady Jun 22 '14 at 17:28
  • You can create new project, add there sources and dependencies, and build it. – Arkady Jun 22 '14 at 17:29
  • or search web for tools that can convert VS2013 to VS2012. If that is reason of problem. – Arkady Jun 22 '14 at 17:29
  • 1
    VS2012 uses tools version "4.0", VS2013 uses "12.0". There may be additional stuff in the .vcxproj file to give you a headache, sounds like you've already been editing it. Something you should *always* mention in a question. – Hans Passant Jun 22 '14 at 17:47

2 Answers2

3

It seems that you are trying to compile a Visual Studio 2013 Project (as it uses ToolsVersion=12.0) on Visual Studio 2012 (uses ToolsVersion=11.0).

So here is the solution to Your problem. #TestedSuccessfully

  1. In your Project Folder open the .Vcxproj file and change ToolsVersion=12.0 with 11.0

  2. You have to change 12.0 with 11.0 at 3 places hopefully. You can check for all occurences and You are done.

It worked for me. I hope will also work for You :)

Crew HaXor
  • 675
  • 1
  • 8
  • 16
0

ToolsVersion "12.0" means that it is a Visual Studio 2013 project file. You need to compile it with the correct compiler.

LVBen
  • 2,041
  • 13
  • 27