[Fixed]fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

how to fix vistal studio 2012

 

Error LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt appear often on Visual C++ 2010 and this error don’t let you to compile and run your program coded on Visual C++. If you got this error you no need to reinstall Visual C++.

 

Causes:

  • this error appear because you have installed Visual C++ 2012 after you have actually installed Visual C++ 2010 in your system;
  • another cause is because .net Framework 4.5 replace .net Framework 4.0;
  • .net Framework corrupted files;

How to solve

  • uninstall .Net Framework 4.5 from your system;
  • then download .Net Framework 4.0 and install it;
  • this should fix your problem;

Other ways to solve it:

Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe and check the version of 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

If you have wrong version you should go to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy cvtres.exe then replace it with
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

 Conclusion:

Now you know how to solve LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt Visual C++ 2010 Error!

If you remove Visual C++ the error will not disappear;

Please let me know if it works property for you!

Related posts:

55 Comments on "[Fixed]fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt"

  1. Prathap says:

    I have common7 and Xml files only on C:\Program Files\Microsoft Visual Studio 11.0 .

    • admin says:

      You don’t have the files because you have uninstalled Microsoft Visual c++ 2012. Now you have to uninstall .net 4.5 and the install .net 4.0

  2. javed says:

    i have the wrong version in Wrong version: 03/18/2010 01:16 PM 31,048 cvtres.exe in visual studio 2010 not in 2011 si how can i do the copy process and from whr?plzzzzzzzzzzzzzzzz

  3. Sergio says:

    replaced by correct version worked perfectly! thank you!

  4. Tushar says:

    Thanks ,it’s Working

  5. thuong says:

    I have only C:\Program Files (x86)\Microsoft Visual Studio 10.0 and C:\Program Files (x86)\Microsoft Visual Studio 9. And my software need to run Framework 4.5. So I have to how to solve. plzzzz

  6. thuong says:

    I try to rename file cvtres.exe . Ex: cvtres1.exe. And it run .

  7. King Usher says:

    Replacing .Net Framework 4.5 with .Net Framework 4.0 worked for me too!

  8. flarn2006 says:

    My VS2011’s cvtres.exe had a filesize of 42K something, but it still worked fine when I replaced it.

  9. Shubhanshu says:

    Thanks for this helpful tip.
    I was stuck for long time. Your solution helped me.
    Thanks again 🙂

  10. Raphi says:

    Thanks – it worked for me! Program builds now 🙂

  11. Luis says:

    Great. So helpful. Tks

  12. Psychosin says:

    yeah changing from .net 4.5 back to 4.0 worked for me too, thanks a lot ,very helpfull

  13. shiny21 says:

    Well that did not work 🙁
    and i only have vs 2010 installed.

  14. Walter says:

    Worked properly for “Visual C++ 2010 Express” (free edition) on WIndows 7:
    – removed .Net 4.5 – which was installed by earlier Visual Product(s)
    – Visual C++ closed with “unknown error”
    – “repaired” Visual C++ by:
    Start->Control Panel->Programs->Programs and Features->Microsoft Visual C++ 201 Express
    (.Net 4 was reinstalled)
    – everything works fine now
    Many Thanks!

  15. Jasmine says:

    I uninstalled .Net Framework 4.5 and installed .Net Framework 4.0. Visual C++ 2010 Express is able to compile now! Thank you so much!!!

  16. zerelli says:

    It work fine!! So helpful .thanks

  17. Sohail says:

    This fixed my problem (specifically: copying cvtres from VC 2011 to 2010).

  18. Amoolya S Kumar says:

    Thanks a million. I didn’t have Visual Studio 2011, and I had no idea why my 2010 version suddenly stopped working. I renamed cvtres.exe to cvtres1.exe and the problem was solved…:)

  19. tttt says:

    OTHER WAYS TO SOLVE IT:

    Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe and check the version of 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

    If you have wrong version you should go to
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
    and copy cvtres.exe then replace it with
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

    this works for me

  20. aviv says:

    thank you verry much

    I have encountered the same problem.
    I installed visual studio C++ 2011, but decided to use visual studio C++ 2010, so i have uninstall the 2011 version.
    I had no problem compiling C++ files, but when i tried to run a code in C, when i tried to compile it i got the error massage described above:
    Error LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

    I have tried the second solution that you have suggested (copying cvtres from VC 2011 to 2010),
    and it worked perfectly.

    so- thanks again…

  21. MoonLightPeter says:

    Removing .NET framework 4.5 and installing 4.0 was the solution.
    Thanks a lot!

  22. Nizwer says:

    Why don’t you guys just do like this 😉

    Project -> Properties -> Linker -> Enable Incremental Linking -> Now just set to “No (/INCREMENTAL:NO)”

    Hope this helps rather than that long procedure 😉

    • Tom says:

      This does not work for everyone. For instance, this was the first thing I tried. I cannot simply uninstall or install anything either because of administrative privileges so it looks like I am gonna have to try renaming cvtres.exe to cvtres1.exe. I hope this works!

  23. TMS says:

    Thank you! The error was happened only after window update. 🙁
    It is fixed after i replaced cvtres.exe. Cool! 😉

  24. Random says:

    It works!!!

  25. Wang says:

    thang you!

  26. Johnk524 says:

    Definitely, what a fantastic website and informative posts, I definitely will bookmark your blog.All the Best! bddbgdedddcc

  27. Lysander says:

    YES! It works superb. thanks

  28. Grettchen says:

    Thank you very much! This was helpful, i uninstaledl .Net Framework 4.5 from my system;
    then downloaded .Net Framework 4.0 from the microsoft website and installed it and finally my problem was fixed! 🙂

  29. koteswar says:

    I have installed VS2013 on top of VS2010. I started getting this error. your post is helped me.
    Thanks a lot.

  30. Raheleh says:

    Hi,
    Thank you very much. It works… 🙂

  31. Frederick Smith says:

    Thank you for the solution it was like refreshing glass of water on a hot day, again thanks…
    🙂

  32. rasool says:

    thanx very much it works

  33. Mohammed says:

    THANK YOU .

    i have Visual Studio 12.0 and i used the other way . and it works . in one mint .

  34. Amir says:

    Best solution.
    Thanks.

  35. Geo says:

    This solution is effective and direct .Thank you very much.

  36. ali says:

    thank you very much.

  37. tushar says:

    Best Solution:

    Go to Project properties -> go to linker -> enable Incremental linking-> make it NO
    Done.

  38. Angki Ang says:

    Thanks a lot for the solution. It’s helped me!

  39. Jitendra Rajput says:

    Thanks a lot, this solution is really great .
    I uninstall the .Net Framework 4.5 and then install 4.0 and it works for me.

    Amazing guys 🙂

  40. gc says:

    worked great! thank you!

  41. Yes, I remove old Framework 4.5 + and install new Framework 4.0. I am success.Thanks for all and specially thank to admin.

  42. link says:

    Thank you, thank you, thank you!
    Very helpful and convenient! 🙂

  43. Satheesh says:

    Thanks a lot!! It is working

  44. appleapps says:

    Simply superb solution… It works

  45. G.J. says:

    It works! Thanks a lot. 🙂

  46. Arman says:

    Thanks a lot!! It is working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  47. hamid says:

    Hi everyone
    I have the same problem with my cvtres.exe, but my VS is 2010 version and i don’t have correct version of cvtress.exe in Microsoft Visual Studio 11. is it possible to upload the correct file, please?

Got something to say? Go for it!