“ResGen.exe”已退出,代码为 -1073741701 或 “ResGen.exe”已退出,代码为 2。

解决的办法如下:

1、关闭所有Visual Studio;

2、以管理员的身份打开命令提示窗口;(开始-运行-cmd)

3、更改目录至"CD C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\”下面;(如图WIN7下64位运行vs2010项目错误.jpg)

4、输入该命令corflags /32bit+ ResGen.exe /force,编译执行看是否可用解决问题,如果不能继续下一步;

5、使用记事本打开.csproj文件;

6、在PropertyGroup下添加Managed32Bit,保存,关闭退出。

“ResGen.exe”已退出,代码为 -1073741701 或  “ResGen.exe”已退出,代码为 2。

错误    4    “ResGen.exe”已退出,代码为 2。 

参考地址:http://jingyan.baidu.com/article/90895e0fe80c6064ed6b0b6b.html

打开项目文件aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2EAAABpCAIAAAA81byYAAAbnklEQVR4nO2dS26svNOHWVQGf7GXTFlHlBWg3kJLWUGLFWSQBWTG9B2cPXyD/gaAXbarDObStzyPrKMTGuzy/UfZQPXfwVwBAAAA4NmoMvLu+/zx8fFxuvweqhH7tq4G6nZ1NlwkdduvjmR3uuYwe7qmqqqq6YaMy1SGX5an68u/6ZbEf2+6Jmkqdynn1ZGlhT1z8rJ62aUfAQAAOEyN+Hs5fZy///s+764R+7b2817XuClt+0zft/UjqZkj6dt6kAhdI1VE39ZV0127Zmk5hOXv1YgR/2PQNTeTQeXl0NbGWX1bLzZ7rMfr9bqwXvR+1DWPpe8BAOCZyPkR//vvv5014uT90G3pp+l1cok0nXOn1G03XFuPjpTxeDAfL9SIzkPj5lrvffHemMDO4Wjd9tI0+VNVVVVdOxGQ8WuKBMZIhpObJnYcSVuEUb37bSqfJJHFGjE4sRfyJh9/ilZuVr6mpP35st7S8onibzqvEdVyzqYr6rttwjpdWs5j/J2PLvhB4BKWHkRZRJnilFXhc7ekXvpApj6cIxgAAJ6E22nE2bkqmQvrtg+9jsEE2XTxbFjgRwzOFI6a1AR/zSQHhv87NesuGGZt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LN8jHKwzy+15yZkJHiyecvZ/rTtJ+f9ejG0zaa+JIfj/o00QwXl2mFyF3Q1+p3RTrxNwy+KyeF4Ze3NffJ2mN8EDACPC+/Qhj9Hzk2b89c8JS+XoRtyQw/3mB5CCgAeCTQiQMBLfd7iDzkR94S3SQMAXNGIAAAAAJCCRgQAAACAGDQiAAAAAMSgEQEAAAAg5v8BmK/Ls03nbNYAAAAASUVORK5CYII=" alt="" />

添加红框内的代码即可。

<ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture>

上一篇:VS2012 生成项目报 "Lc.exe已退出,代码为-1" 错误


下一篇:Python必知词汇:字符集