Unhandled Exception System.BadImageFormatException
I have two project; a C++ library project and a C# windows application. Both are built in VS2008. Now I have to shift it to VS2012 but when I converted and run it; application crashes.
Build Configuration:
C++ Project: Win32
C# Project: x86
Call Stack:
ntdll.dll!_ZwRaiseException@12() + 0x12 bytes
ntdll.dll!KiUserExceptionDispatcher@8() + 0x2a bytes
KernelBase.dll!754ab727()
[Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]
mscorwks.dll!52fa7d1c()
mscorwks.dll!53010dfc()
mscorwks.dll!530bc9f0()
mscoreei.dll!720ff5a3()
KernelBase.dll!754b11c4()
mscoree.dll!72177efd()
mscoree.dll!72177f16()
mscoree.dll!72174de3()
kernel32.dll!751733ca()
ntdll.dll!__RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
Output:
'MyCSharpProject.exe': Loaded 'D:Source2SourceExamplesCode Samplesbinx86DebugMyCSharpProject.exe', No native symbols in symbol file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64ntdll.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64mscoree.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64kernel32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64KernelBase.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64advapi32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64msvcrt.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64sechost.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64rpcrt4.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64sspicli.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64cryptbase.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsMicrosoft.NETFrameworkv4.0.30319mscoreei.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64shlwapi.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64gdi32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64user32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64lpk.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64usp10.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64imm32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64msctf.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsMicrosoft.NETFrameworkv2.0.50727mscorwks.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:Windowswinsxsx86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fcmsvcr80.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64shell32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64ole32.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsSysWOW64profapi.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Loaded 'C:WindowsMicrosoft.NETFrameworkv2.0.50727Culture.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe': Unloaded 'C:WindowsMicrosoft.NETFrameworkv2.0.50727Culture.dll'
'MyCSharpProject.exe': Loaded 'C:WindowsassemblyNativeImages_v2.0.50727_32mscorlib62a0b3e4b40ec0e8c5cfaa0c8848e64amscorlib.ni.dll', Cannot find or open the PDB file.
'MyCSharpProject.exe' (Managed (v2.0.50727)): Loaded 'C:WindowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module.
Additional information: Could not load file or assembly 'MyCSharpProject.exe' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
链接地址: http://www.djcxy.com/p/95506.html