This question already has answers here:
VS 2012 - Project failed to build because of missing Toolset
(2 answers)
Closed 6 years ago.
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?
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
In your Project Folder open the .Vcxproj file and change
ToolsVersion=12.0 with 11.0
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 :)
ToolsVersion "12.0" means that it is a Visual Studio 2013 project file. You need to compile it with the correct compiler.
Related
I'm trying to look at a code of a project from a few years ago (about 3 years from the files' dates) and when I opened the .sln file in Visual Studio 2019 I got the following message:
PmcSimTester.sln: Visual Studio needs to make non-functional changes to this project in order to enable the project to open in released versions of Visual Studio newer than Visual Studio 2010 SP1 without impacting project behavior.
After hitting ok and trying to run the debugger, the file "corecrt_wconio.h" is opened in visual studio and I get 110+ errors of the same kind:
E225 __clrcall not allowed on function with ellipsis parameter
Now, from my understanding it's an error related to incompatibility of an older project to newer environment. I couldn't find a solution to this problem.
Is there a way to make it work in VS19?
Whether you have installed the Windows 10 SDK?
I suggest you could try to install the suitable windows 10 SDKs from the visual studio installer.
At the start I'd like to note that I've spent some time researching this issue and suggested solutions for similar questions like this one didn't help me.
Problem background
I need to migrate a Firebreath plugin project (which I haven't worked on previously) from PC_1 to PC_2.
As far as I'm aware the project was started on PC_1 on Visual Studio 2010 and later moved to Visual Studio 2013 Pro. There's one solution consisting of 19 projects. I have an instruction which says that in order to get the plugin installer I should first Build project_x and after that Build project_y_WiXInstall. Both steps work without any issues on this machine.
Then there's PC_2 which had Visual Studio 2015 Community installed before I started working on it. I've removed it, installed Visual Studio 2013 Pro (version 12.0.21005.1 REL - exactly the same as on PC_1), moved all of the needed files and I'm trying to get rid of all of the compilation errors. So far I figured out I had to install Cmake 2.8, Windows Driver Toolkit 7.1 and manually override an incorrect VCTargetsPath MSBuild variable
Problem description
Currently when I try to compile the project on the new machine I get these two errors (this is an image link since I can't embed images yet on this account). I'm not sure what's going on with the first error message since it looks incomplete and the file CUSTOMBUILD doesn't exist, but I'm not bothered by it too much since the previous compilation error I fixed also had a similar "artifact" as the first error and it disappeared after fixing the second one.
The covered part of the second error message is the project path. The error origin (Microsoft.Cpp.Platform.targets file, line 64) looks like this:
<!-- Error out if toolset does not exists in Visual Studio 2010 or 2012 -->
<VCMessage Code="MSB8020" Type="Error" Arguments="$(_CurrentPlatformToolsetShortName);$(PlatformToolset)" Condition="'$(ToolsetTargetsFound)' != 'true'" />
What didn't help
The error description suggests using an Upgrade Solution... option, but there's no such thing when I right-click the solution
As an accepted answer for the question I've posted at the start of my post suggests, I've checked the Properties of all 19 of my projects (including the project ZERO_CHECK) but their Platform Toolset is already set to Visual Studio 2013 (v120).
I've also tried changing the Platform Toolset to inherit from parent or project defaults for all of the projects. This resulted in it switching to Visual Studio 2010 (v100) (not installed) and after that I've right-clicked on the projects and chose Upgrade VC++ compiler and libraries. After this the Platform Toolset was back to the Visual Studio 2013 (v120) but it didn't help with the compilation error.
As a NON-accepted answer for the question I've posted at the start of my post suggests, I've tried searching for all of the occurrences of 10.0 and V100 in all of my .vcxproj files to replace them but I haven't found any occurrences of them.
[EDIT]
I just got an idea to try building the project with MSBuild from the command line. There's a bit more info compared to errors inside Visual Studio, so maybe it will help with resolving the issue: https://pastebin.com/JhN3dXM3
So the thing you're missing here is that FireBreath projects are built using CMake -- the actual contents of the build directory should always be completely temporary and never stored in source control. To build the project on a new computer you need to run the prep command again from scratch.
If the previous maintainer changed the build files manually and/or migrated it to a newer version of visual studio without using cmake to do it then they did some very ugly things and all bets are off... good luck.
This is why all the firebreath documentation (I wrote most of it) strongly urges that the build directory be transient and you always do project file updates in cmake.
Hope that helps!
I just run into a bug inside Visual Studio 2017 C++ Preview 3; The include file include/iosfwd is missing member seekpos() in class fpos, therefore boost no longer compiles with error error C2039: 'seekpos': is not a member of 'std::fpos<_Mbstatet>'
Microsoft already knows the issue ( https://developercommunity.visualstudio.com/content/problem/282567/member-seekpos-in-class-fpos-is-missing.html?inRegister=true ) with last update 2 days ago.
By reporter, the file include/iosfwd inside VS 2017 Preview 2 is not corrupted. But downgrade is impossible.
If you, by any chance, still have VS 2017 Preview 2 can you post that file (located here: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\VC\Tools\MSVC\{Build}\include\iosfwd ) on some gist and post link to it?
The inability to compile boost program is a blocking issue for our project.
Got it on the linked issue (as solution): https://developercommunity.visualstudio.com/content/problem/282567/member-seekpos-in-class-fpos-is-missing.html?inRegister=true
This question already has answers here:
MSVC 2015 Universal CRT for app-local deployment
(2 answers)
Closed 6 years ago.
Short Version: Is it possible to run an executable compiled with Visual Studio 2015 without installing the Visual C++ Redistributable Packages, and instead copying the runtime DLLs into the same folder as your executable?
Long Version...
Since the mid 1990s I have written small programs using Visual C++ and then later Visual Studio. Up until Visual Studio 2013 I have always been able to run these programs on any Windows host as long I put msvcpXXX.dll and msvcrXXX.dll in the same directory. I have never needed to install the Visual C++ Redistributable Packages.
Now with Visual Studio 2015 this appears to no longer work. First there is no msvcrXXX.dll. So I copied msvcp140.dll and three other DLLs I found in the Visual Studio folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT (concrt140.dll, vccorlib140.dll, vcruntime140.dll). Still doesn't run.
Looking at the depends.exe makes me think there are a lot of dependencies that are not resolved in these DLLs. I confess I got a little overwhelmed and didn't keep digging on my own to figure out every DLL I need to have to satisfy the dependencies. But it started feeling very hacky, as many of them were installed under C:\Windows and not present in my Visual Studio redistributable folders.
Anyway, can anyone help?
This was surprisingly not closed as a duplicate. And I hate leaving open questions unanswered. So I'll answer it myself by saying that codestation's comment links to this question which links to this article which describes how to do this in the section that starts with bold red text.
You shouldn't upvote this. Upvote the answer in the linked question.
So,I am trying to port some old code to newer version of vs so I imported the sln of the project into my vs 2013 and I get this error and some others and I have gone through some of the other questions on this forum.So I understand that this has something to do with MFC(microsoft foundation classes) but all of them talk about vs 2010 express edition which doesn't include MFC module.I am currently using vs 2013 community edition which is supposed to have full feature access of vs.Still I get this error so please help!!
Thanks!
While installing Visual Studio 2013, you need to select the MFC option: