Solution 1:
It is normal to install vs2010 on the original machine. After installing vs2012, a prompt is displayed.
Error 13 Error lnk1123: failed during coff conversion: The file is invalid or corrupt,
The specific cause is that the format of Microsoft's linked files has changed (Microsoft is speechless)
The specific solution officially provided by Microsoft is to patch vs2010 with SP1.
Yes: http://www.microsoft.com/en-us/download/details.aspx? Id = 23691
Solution 2:
Is the problem of embedding the list, so the following operations are performed on the project and all dependent projects
Right-click a project and choose "Project Properties"> "configuration properties"> "configuration tool"> "input" and "output"> "embedded List". Select "no".
1> link: Fatal error lnk1123: failed during coff conversion: Invalid or corrupt file
1> cvtres: Fatal error cvt1100: duplicate resources. Type: manifest, name: 1, language: 0x0409
This is caused by log files.
Project \ properties \ configuration properties \ Configuration tool \ Input and Output \ embedded list: changed from "yes" to "no ".
Or set
Project \ properties \ configuration properties \ linker \ configuration file \ generate a list: It turns out to be "yes" and changed to "no ".
I summarized the solution to this effect:
1: if the name is a static library, it is possible to change the embedded list to "no" when there is no essential resource file in the name.
2: If the name already has a resource file, changing the embedded list to "no" will not be able to handle the effect, unless you remove these resource files at the same time.
Conclusion: To ensure that no resource file exists in the name and change the embedded list to "no", this effect may be handled, but it does lose the role of the resource file and there is no way to deal with it, who makes him a bug.
Solution 3:
Use vs2012 to compile an MFC program that supports XP
November 28,201 2, posted by posted in [Channel 8]
Visual Studio 2012 has been released for a while, and it feels good to use it. However, it is troublesome to write a small program recently.
This program is an MFC application written in Visual Studio 2012. After compilation, it has been debug and run in the win7 system, and everything is normal. However, if you run it on XP or 2003, The system prompts "not a valid Win32 application ". At first, I thought the file was damaged. Later I copied the file several times and found the problem still.
Then I searched and found that many people mentioned this problem, mainly because of vs2012, the compiled program no longer supports XP. However, Ms officially mentioned that a patch will be released to solve this problem. The patch was originally included in Visual Studio 2012 update 1 CTP 3. After searching for this package, we found that the official version of Visual Studio 2012 update 1 was released on the 26th (that is, more than one day ago), so we downloaded and installed the package.
According to the official prompts, after the installation is successful, open vs2012. In the properties of the project, there should be configuration properties-General-platform tool set "Visual Studio 2012 (v110 XP) ". Unfortunately, this update 1 package is installed online, and there is always a package that cannot be downloaded, and it does not help to install it several times.
In desperation, I re-installed a Visual Studio 2010 project, but it is too troublesome to convert the original project into a 2010 Project. Fortunately, when we look at the properties of the project from 2012, "Visual Studio 2010 (v100)" and "Visual Studio 2008 (v90)" appear in the platform tool set. So the project is re-generated, compiled, and then a problem occurs.
The problem is "link:FatalErrorLnk1123:ConvertCoffFailed:
The file is invalid or damaged ". This problem is also common when you continue searching. The solution is the same. That is, you can continue to set the properties of the project and choose "Configure properties"> "configuration tool"> "Input and Output"> "embedded list"> "no.
After setting this method, it seems that it is still not easy to use, but it seems that other people on the Internet have used this method to solve the problem. It is strange. Later, it was suddenly found that the installation notice of Visual Studio 2010 SP1 Patch was displayed in the lower right corner of the system. You may need to use 2010 in the future, so you can use the previously downloaded SP1 installation package for installation. Then, I tried again and was pleasantly surprised to find that the problem was solved. Finally, I compiled the MFC program that can be run in XP and 2003.
To sum up, install vs 2010 and SP1, set the embedded list of the attribute to "no", set the platform tool set to "2010", and generate a new one.
In fact, this is a temporary rush to solve the problem. It is estimated that the network installation of vs2012 update 1 will be stable in a few days, you can use the 2012 toolset to compile programs that support XP and 2003.
Solution 4:
This is what Microsoft does. Once a problem occurs, you can only reinstall the system. I also use this stupid solution. However, it may be because I have installed VC on drive d before, and may overwrite the installation, which may cause some files to be damaged. So I uninstalled VC first, and then deleted the folder D:/program files/viusaul Studios. This directory was previously installed. Then restart the computer and reinstall it. Re-open the small project, compile, and pass.
Summary: these methods are obtained from the Internet. After my tests, method 2 will work, but one of the three projects I tested will never work, use solution 1 to download an SP1 package (about 600 mb). After the package is installed, restart the package. Open Vs and follow the prompts in the pop-up box of Vs to install other patches and re-compile the package. The problem is solved!