VS2012 RC installation breaks VS2010 C++ projects
-
Saturday, June 02, 2012 11:38 AM
After installing VS2012 RC I can't compile my VC projects in VS2010.
I receive "fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt".
All Replies
-
Saturday, June 02, 2012 1:25 PM
Please help me!
I extremely need working Visual Studio to complete my project by Monday. Uninstalling VS 2012 didn't fix the problem, as soon as reinstalling VS 2010.
Will try to uninstall everything - Studio, SDK - but I'm afraid it will not help.
- Proposed As Answer by mdh2008 Friday, August 24, 2012 8:33 PM
- Unproposed As Answer by mdh2008 Friday, August 24, 2012 8:33 PM
- Proposed As Answer by windows update nao funciona Sunday, March 03, 2013 6:47 PM
-
Saturday, June 02, 2012 1:32 PM
Btw, Visual Studio 2008 is still working.- Proposed As Answer by windows update nao funciona Sunday, March 03, 2013 6:47 PM
-
Sunday, June 03, 2012 11:11 AMGot the same error on my desktop PC when compiling a new, bare c++ project with Visual Studio 2010 and VS2012RC installed. This combination on my laptop gives no problem at all.
-
Sunday, June 03, 2012 7:13 PM
I've managed to get it work again by re-installing visual studio- Proposed As Answer by hberntsen Sunday, June 03, 2012 7:13 PM
-
Sunday, June 03, 2012 8:04 PM
I've managed to get it work again by re-installing visual studio
I have exactly the same problem, but reinstalling vs2010 didn't solve it. I can make it work again olny by uninstaling both vs2010 and vs2012, and then intalling vs2010 again. Is that what you have been doing, or you just reinstalled vs2010 and it began to work? -
Monday, June 04, 2012 6:52 AMModerator
Mikhail-ITS,
Welcome to the MSDN forum.
Sorry for having you run into this issue, actually, installing beta software on a production system is a high risk maneuver.
Now please try to fully uninstall VS2012 through control panel then uninstall VS2010 with this tool
http://archive.msdn.microsoft.com/vs2010uninstall
(PS: Since you have installed VS2008 on your OS, first just try default command )
Then re-install VS2010, tell me if there is any error when installing.
Thanks,
Barry Wang [MSFT]
MSDN Community Support | Feedback to us
-
Monday, June 04, 2012 10:58 AM
I think I've found a solution for some C++ projects in vs2010. If you are using 'incremental linking' you will have this "fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt". In my case I've swiched it to "No", and now project compiles and run without any problem.
If you want to try go to: Project Properties -> Configuration Properties -> Linker (General) -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
about "Incremental Linking": http://msdn.microsoft.com/en-us/library/4khtbfyf(v=vs.100).aspx
- Proposed As Answer by Dor Tzur Wednesday, August 22, 2012 10:44 AM
-
Monday, June 04, 2012 12:36 PM
Do you have VS2010 SP1 installed? In the Compatibility page it states that:
If Visual Studio 2012 RC and Visual Studio 2010 with SP1 are installed on the same computer, you can open the project in both of those versions of Visual Studio.
- Proposed As Answer by twinlights7 Friday, June 15, 2012 7:59 PM
- Marked As Answer by Forrest GuoMicrosoft Employee, Moderator Thursday, June 21, 2012 3:06 PM
-
Monday, June 04, 2012 7:25 PM
Thank you Fluesopp. After installing SP1 projects compiles with and without incremental linking, so it probably replaced/repaired linker.
About that projects compatibility, it doesn't seem to work for me, maybe beacause of all that reinstalling.
-
Wednesday, June 06, 2012 12:57 AMI also get the same error but I do not have VS2010 installed on my system. I use VS2010 C++ express to compile the c++ projects. But after upgrading to VS2012 I get the "fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt". Anyone knows why this occurs?
-
Wednesday, June 06, 2012 9:45 AM
We're having the same problem, while having no problems during the beta. I tried to turn off incremental linking, but it doesn't appear to make a difference. The problem only occurs in project that have resource files (.rc), and fails only on those during linking. The .res files generated do not seem to differ from systems without VS2012 installed.
Due to our integrated build system based on VS2010, it's not trivial to update to SP1. Does anyone have any hints to where I might start looking for another solution, or what exactly is causing the problem in the first place? For as far as I can see, the environment variables seem correct, and we haven't been able to find any updated DLLs that seem suspicious. I'd hate to have to go through a complete uninstall of all my visual studios, and we'd really like to be able to use VS2012 as an IDE.
-
Wednesday, June 06, 2012 3:35 PMI think Murazor2222 is on to something here. I am seeing the same error message but only for projects that have resource files. FWIW, the VS2012 linker seems to work as a replacement, but of course that may not help people who would rather not change their production tools.
-
Tuesday, June 12, 2012 8:18 PMModerator
It's been reported that installing VS2010 SP1 should solve this problem. Does everyone with this problem have VS2010 RTM?
- Heath @ http://blogs.msdn.com/heaths; Visual Studio Professional Deployment
-
Wednesday, June 13, 2012 3:36 PMI have been using VS 2010 C++ express. So could not install VS2010 SP1. Is there any other workaround for it?
-
Friday, June 15, 2012 8:00 PMI full uninstalled 2012 RC and 2010 then reinstalled 2010 to no avail. However, updating to SP1 fixed the error I was receiving.
- Proposed As Answer by Jeganathan Wednesday, June 20, 2012 10:43 AM
- Unproposed As Answer by Jeganathan Wednesday, June 20, 2012 10:44 AM
-
Friday, July 06, 2012 1:38 PM
I uninstalled 2012 RC, then opened the sln file with 2010 SP1. When I
compile I get the following error:Error 1 error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets 518 6 Test2
How do I get the sln file to work on 2010 SP!???
- Reinstall 2010 SP1?
- Restore from backup the sln file - or some other file
- Something else?Thanks
-
Friday, July 06, 2012 5:26 PMModerator
If you have a recent backup, it may be best to restore it. Hopefully, though, it's no more difficult than changing the ToolsetVersion at the top of the SLN and/or *PROJ files to use "4.0" instead. It would help to see the declarations of your SLN and *PROJ files (you can remove any Item groups for safety) if that doesn't work.
- Heath @ http://blogs.msdn.com/heaths; Visual Studio Professional Deployment
-
Friday, July 06, 2012 8:04 PM
I discovered that if I edit the <PlatformToolset...> in each <proj>.vcxproj file from v110 to v100 then I can compile with VS2010 SP1. Unfortunately I first headed in the direction of repairing/uninstalling VS2010 with a plan to reinstall it. This was a big time wasting goof. The exe install (not the iso file) at MSDN subscriptions failed with a bunch of missing cab files. The exe install of SP1 failed with missing msi files. Both near the end of waiting a long time. The only success I had was using the iso files burned to DVD's. Now I'm waiting for Windows Update to install some update to VS2010 SP1.
The "ToolsVersion" is already 4.0. There is no ToolsetVersion in either sln or vcxproj files.
-
Wednesday, August 08, 2012 1:59 AMI too did the same, it has totally messed up my computer, as bad as I need to be able to get back into VS2010 I get nothing but fatal error messages. I have to go to class to do the work, and that is not always easy or possable. If someone has the answer, please help.
DawnP
-
Wednesday, August 08, 2012 2:04 AMI dislike having to use both, how can I uninstall VS 2012 and just use VS2010? When I did this before, VS2010 did not work still. I kept getting fatal error messages. Any help will be a big help. Especially since there are no tutorials on how to work in VS2012 for those of us who are beginner programmers.
DawnP
-
Thursday, August 09, 2012 6:17 PMModerator
Search http://support.microsoft.com for "uninstall visual studio 2012" and you'll find instructions. Currently, the Beta instructions are the latest but will work for RC (product names in Add/Remove Programs might be slightly different, but will be obvious differences like "RC" instead of "Beta", or for SQL packages "RC" will be missing in the VS 2012 RC (since SQL release before our final RC was built).
But after uninstalling 2012, you need to repair VS2010. In 2012 we implemented package ref-counting for most packages to solve the long-standing uninstall issues of past releases. However, some of those same packages (that didn't change between 2010 and 2012) don't benefit from ref-counting since they are older and do not use this feature.
- Heath @ http://blogs.msdn.com/heaths; Visual Studio Professional Deployment
-
Sunday, August 12, 2012 6:28 PM
Sorry, but doing this search does not give any useful results. Can you provide a link to these instructions? I have something wrong with VS2012 RC that causes it to crash at breakpoints, which makes it pretty much useless. I have done an uninstall-reinstall cycle twice, and it still fails, so I think I am missing something on the uninstall.Search http://support.microsoft.com for "uninstall visual studio 2012" and you'll find instructions.
-
Thursday, August 23, 2012 5:49 AM^ THIS. Good job, this fixed my problem right away! Thank you so much for sharing.
-
Friday, August 24, 2012 8:55 PM
I tracked down where the problem is coming from...
...the x86 version of cvtres.exe had changed.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
Wrong version: 03/18/2010 01:16 PM 31,048 cvtres.exe
Correct version: 02/21/2011 06:03 PM 31,056 cvtres.exe
The wrong version has a dependancy on msvcr100_clr0400.dll
The correct version has a dependancy on msvcr100.dllFortunately, I had another VS2010 installation without VS2012 installed on it where I found the GOOD version of cvtres.exe.
Once I copied the GOOD over the BAD everything builds sucessfully.
Quicker solution than uninstalling and re-installing but you have to have a good version of the file.
- Proposed As Answer by mdh2008 Friday, August 24, 2012 8:57 PM
-
Tuesday, August 28, 2012 6:05 PMModerator
Did you install any pre-releases of VS2012?
Also, to properly diagnose the problem we need install logs as requested. Please download and run http://aka.ms/vscollect, then upload %TEMP%\vslogs.cab to an Internet share like http://skydrive.com. Share the file and paste the URL here for further diagnostics.
- Heath @ http://blogs.msdn.com/heaths; Visual Studio Professional Deployment
-
Saturday, September 01, 2012 6:07 PMWhat is good job? what fixed your problem???I cannot find any solution to the problem till now
-
Sunday, September 02, 2012 4:41 PM
I had the same problem with Visual Studio 2010 Ultimate (without SP1).
I fixed the problem by uninstalling .NET Framework 4.5 and re-installing 4.0.
hope this help
P.S. Visual 2012 wasn't installed, only had .NET Framework 4.5- Edited by Rafael_GV Sunday, September 02, 2012 4:47 PM
- Proposed As Answer by felipe.aburaya Wednesday, December 26, 2012 4:53 PM
-
Sunday, September 09, 2012 7:26 PM
I installed VS 2010 SP, and compilation works well under VS 2012. I did hit a bug with _MSC_VER being set incorrectly. It's set to 1700 (VS 2012) for both the 2010 and 2012 compiler. Shouldn't it pull the value from the compiler version as the docs state (not the native IDE compiler)?
-
Monday, September 24, 2012 3:35 AMFixed by excluding app.rc from the project. (Also turned out incremental build and manifest generation, but no joy til exluding that file)
- Edited by Matt Searles Monday, September 24, 2012 3:36 AM
-
Wednesday, September 26, 2012 6:31 PMThank you so much pszczolek. I used your solution and it worked fine for me.
-
Tuesday, October 02, 2012 4:22 PMThanks alot....best solution saved my day.
-
Wednesday, October 10, 2012 9:21 AM
Thank you very much for this - just to update the information for anyone else who has this problem.
The "wrong version" of cvtres.exe is the one shipped in vs2010 RTM
The "correct version" is one from vs2010 SP1.
So if you do not have a SP1 version around to copy the file from upgrading to SP1 will sort the issue (as others in this thread have mentioned).
Just for clarity (there actually appear to be several problems discussed in this thread) - my issue and resolution was :-
Had VS2010 RTM installed
Installed VS2012 RTM (no beta's or previous versions used)
This broke the linker for VS2010 when linking a .res file generated from a .rc with the error message given at the start of this thread.
Our solution was to upgrade vs2010 to SP1 (didn't have SP1 available on any other machines since we tend not to automatically upgrade after been bitten by abi changes on vs2008RTM -> vs2008 SP1) but subsequent tests has shown that mdh2008 's answer was correct - simply changing the 1 file is suffecient.
-
Wednesday, October 10, 2012 6:53 PM
I have installed first VS2012Ex and because I need to compile my dll for XP, I later installed VS2010Ex, changed the toolset to v100 and got this error.
After reading this topic and trying all different suggestions about project properties (manifest generation/incremental linking), I kept getting the error.
The solution that worked was replacing the cvtres.exe from VS2010 with the one from VS2012.
-
Friday, November 02, 2012 8:57 PMThanks mdh2008. This works for me as well. While I'd be reluctant to make a hack like this on a production build server (I'd probably install VS2010 SP1 instead), this is a perfect quick fix for a dev machine.
-
Tuesday, December 18, 2012 3:44 PMGreat under-the-hood-work - thanks, fixed me!
I need more memory. Wait - what was it I needed?
-
Wednesday, December 26, 2012 4:53 PM
Worked for me. Thanks!
By the way, I was not using Visual Studio 2010 exactly, but the Windows SDK v7.1. I had this issue reported by CMake from inside Qt Creator.- Edited by felipe.aburaya Wednesday, December 26, 2012 4:54 PM
- Edited by felipe.aburaya Wednesday, December 26, 2012 4:55 PM
-
Wednesday, February 27, 2013 3:34 AMThanks for sharing what you fixed and how you did it. Thanks
-
Wednesday, February 27, 2013 4:24 PM
Where to get a copy of CVTRES.EXE made on 2/21/2011?
Thanks mdh2008. Your solution makes the most sense!
However I do not have any copy of the CVTRES.EXE made in February 2011. Where can I download this file?
Thanks
-
Tuesday, March 26, 2013 10:09 AM
Rename the C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe, so that the newer cvtres.exe in C:\Windows\Microsoft.NET\Framework\v4.0.30319 will be chosen.- Proposed As Answer by RatnaAyu Tuesday, March 26, 2013 10:13 AM

