I've installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I'm not 100% sure of this, but it seems to be related to projects that have .rc
(resource) files in them.
I've tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.
I also get the same error if I use Visual Studio 2012 RC to compile the C++ projects when set to use the Visual Studio 2010 toolset. Upgrading to the Visual Studio 2011 toolset fixes the problem (but of course I don't want to do this for production code).
Update: I've uninstalled Visual Studio 2012, rebooted, and the problem still persists! Help!
For me, setting 'Generate Manifest' to 'No' fixed it. (Also fixed with /INCREMENTAL:NO)
I had this problem after I installed Visual Studio 2017 and .NET Framework 4.6 on the machine that previously had Visual Studio 2010.
The problem was that after such an installation the file msvcr100_clr0400.dll from C:\Windows\System32 was overwritten with the new one with a very small size ~19 Kb, however the former one was ~800 Kb.
After I restored the file manually from another build machine cvtres.exe started working properly again.
To summarize:
if step1 not work, do Step2
if step2 not work, do Step3 Copy file one of:
C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\bin\cvtres.exe
Then, replace to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe With me, do 3 step it work
I solved this by doing the following:
Thus the problem will go forever. Do build randomly and debug your C++ projects without any disturbance.
Reinstalling CMake worked for me. The new copy of CMake figured out that it should use Visual Studio 11 instead of 10.
This MSDN thread explains how to fix it.
To summarize:
Either disable incremental linking, by going to
or install VS2010 SP1.
Edits (@CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.
This affects Microsoft Windows SDK 7.1 for Windows 7 and .NET 4.0 as well as Visual Studio 2010.