Tags:Export resgen.exe "exited Code 2 |
Category:Xianfo |
Problem AnalysisThis is because vs2010 cannot compile. net3.5.
Create a. Net 3.5 W with vs2010Inform itemProject, the result compilation fails, and this problem is also the second one. It's really tangled ···
I am no longer lazy this time. Please record the solution.
In 64-bit Windows 7, using vs2010 to compile a. Net project before 4.0 may cause problems. The original reason is resgen.exe. It runs in a 64-bit environment. When he tries to load a 32-bit executableCodeThe execution will fail:
Failed to execute command:
"" C: \ Program Files (x86) \ microsoft sdks \ windows \ v7.0a \ bin \ resgen.exe "(omitted here ···)
Solution
FollowOfficial Solution, Translated directly
1. Disable Visual Studio.
2. Run Visual Studio command prompt (2010) as an administrator in the Visual Studio Tools directory ),
[Note: this is at the beginning -- allProgram-- Under Microsoft Visual Studio 2010]
Switch the directory": \ Program Files (x86) \ microsoft sdks \ windows \ v \ bin \". (My Name Is v7.0a)
[Note: UseCD commandSwitch Directory]
3. Run the following command:
Corflags/32bit + resgen.exe/Force
4. Open the. csproj file in Notepad
5. Add<Resgentoolarchitecture> managed32bit </resgentoolarchitecture>This property is under propertygroup: Save the file.
Try compiling again. Everything is OK!
Reprinted from: gisoracle http://www.cnblogs.com/gisoracle/archive/2012/06/11/2544552. HTML