vs2010常见问题
一、
LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
用VS2010编译C++项目时出现这样的错误:
LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
方案一:(这个方法比较好,在用qt运行时出现问题也能解决)
复制 C:\Windows\winsxs\x86_netfx-cvtres_for_vc_and_vb_b03f5f7f11d50a3a_6.1.7601.17514_none_ba1c770af0b2031b
目录下的 cvtres.exe 到C:\Program Files\Microsoft Visual Studio 10.0\VC\bin 目录下,直接覆盖替换。
方案二:
是嵌入清单的问题,于是对该工程以及所有依赖工程进行如下操作
右键->工程属性->配置属性-> 清单工具->输入和输出->嵌入清单,选择[否]
1>LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
1>CVTRES : fatal error CVT1100: 资源重复。类型: MANIFEST,名称: 1,语言: 0x0409
这个是由于日志文件引起的,可以将
项目\属性\配置属性\清单工具\输入和输出\嵌入清单:原来是“是”,改成“否”。
或者将
项目\属性\配置属性\链接器\清单文件\生成清单:原来是“是”,改成“否”。
二. Fix “The application cannot start” Error
The Workaround
To workaround these issues, you’ll need to reset your settings file. NOTE: The IDE will be reset to its default state and all customizations will be lost. If you have customizations that you want to save, please copy CurrentSettings.vssettings under “%USERPROFILE%\Documents\Visual Studio 2010\Settings” to another location.
If you’re using a non-Express SKU:
Start Menu->Run (or Windows Key + R for the keyboard savvy)
Type “devenv /resetuserdata”. The issue should now be fixed.
If you wish to reimport your old settings, go to Tools->Import and Export Settings, select “Import selected environment settings and browse to the .vssettings file you saved.
If you’re using an Express SKU your steps will be a bit different:
Start Menu->Run (or Windows Key + R for the keyboard savvy)
Depending on the SKU installed, type the following:
For Visual Basic Express type, “vbexpress /resetuserdata”
For Visual C# Express type, “vcsexpress /resetuserdata”
For Visual C++ Express type, “vcexpress /resetuserdata”
For Visual Wed Developer Express type, “vwdexpress /resetuserdata”
ref: https://blogs.msdn.microsoft.com/visualstudio/2009/10/28/how-to-fix-the-application-cannot-start-error/
How to Fix “The application cannot start” Error
三. 安装sp1后能够debug 64bit程序
### VS 秘钥
vs2010
YCFHQ9DWCYDKV88T2TMHG7BHP
vs2013
Visual Studio Ultimate 2013 KEY(密钥):BWG7X-J98B3-W34RT-33B3R-JVYW9
Visual Studio Premium 2013 KEY(密钥):FBJVC-3CMTX-D8DVP-RTQCT-92494
Visual Studio Professional 2013 KEY(密钥): XDM3T-W3T3V-MGJWK-8BFVD-GVPKY
Team Foundation Server 2013 KEY(密钥):MHG9J-HHHX9-WWPQP-D8T7H-7KCQG
vs2015专业版:
HMGNV-WCYXV-X7G9W-YCX63-B98R2
vs2015企业版:
HM6NR-QXX7C-DFW2Y-8B82K-WTYJV