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

前端 未结 26 2475
误落风尘
误落风尘 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 07:59

    +1 to user Short for an answer that worked for me!

    I tried to do some debugging of this with msbuild /v:diag, and I'm seeing that MSBuild is trying to embed a manifest in the executable, with .dll.embed.manifest.res on the linker command line, where that is a resource file built from .dll.embed.manifest. But the manifest file is an empty Unicode text file. (That is, a two-byte file with the Unicode 0xFEFF prefix)

    So the root problem seems to have something to do with that manifest file not being generated, or it being used when .dll.intermediate.manifest should have been used.

    An alternate solution seems to be to turn off the "Embed Manifest" option under Properties, Manifest Tool, Input and Output.

提交回复
热议问题