Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview

前端 未结 26 2392
误落风尘
误落风尘 2020-11-22 07:45

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 erro

相关标签:
26条回答
  • 2020-11-22 08:01

    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.

    0 讨论(0)
  • 2020-11-22 08:02

    I had the same problem with Microsoft Visual Studio 2010 Ultimate and it was solved by the method described in this youtube video

    The video suggests to rename the file cvtres.exe in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin (in my Win7X64 matchine) to cvtres-old.exe

    0 讨论(0)
  • 2020-11-22 08:02

    I had the same problem after updating of .NET: I uninstalled the .NET framework first, downloaded visual studio from visualstudio.com and selected "repair".

    NET framework were installed automatically with visual studio -> and now it works fine!

    0 讨论(0)
  • 2020-11-22 08:03

    According to this thread in MSDN forums: VS2012 RC installation breaks VS2010 C++ projects, simply, take cvtres.exe from VS2010 SP1

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
    

    or from VS2012

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
    

    and copy it over the cvtres.exe in VS2010 RTM installation (the one without SP1)

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
    

    This way, you will effectively use the corrected version of cvtres.exe which is 11.0.51106.1.

    Repeat the same steps for 64-bit version of the tool in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cvtres.exe.

    This solution is an alternative to installation of SP1 for VS2010 - in some cases you simply can't install SP1 (i.e. if you need to support pre-SP1 builds).

    0 讨论(0)
  • 2020-11-22 08:05

    I tried a few times and finally solved the problem by uninstalling several times the VS2010. I think I hadn't uninstalled all the files and that's why it didn't work for the first time.

    In the installation of VS2012, it is said that if you have VS2010 SP1 you can't work on the same project in both programs. It is recommended to have only one program.

    Thanks!

    0 讨论(0)
  • 2020-11-22 08:09

    I was using the Windows SDK for core Win32 programming and had .NET 4.5 installed for "unknown" reasons. I have uninstalled that and installed 4.0 like previous answers and yeah, it worked for me too.

    Just am flabbergasted that I had to use the useless .NET framework for building Win32 apps using the SDK.

    0 讨论(0)
提交回复
热议问题