I have an issue with VS2015.
I want to create a DLL that reads through .csv file, and for this, I'll use the Jet ADO Provider, but it only works in 32-bits.
Therefore, I am trying to execute a 32-bit DLL on my 64 bit windows 7.
I have created a Class Library Project, with an empty UserControl. No external reference, no code whatsoever.
If I run in "Any CPU" or "x64", everything works fine. If I set the target CPU to "x86", it won't lauch, with error
An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
In the console, I can read:
'UserControlTestContainer.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
It seems to indicate that mscorlib.dll is loaded from a 64-bit folder, although I am in 32-bit, and I haven't found where to change this.
Could you please help me fix this?
Regards, Maxime
Thanks to the comments on the question, I managed to get it to work:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.