I have started making a C# program on a XP 32bit windows operating system in c# 2008, and now i am trying to open it in Windows 7 64bit operating system. The problem that arises is that i can't run the program in c# 2010 on my 64bit system and it won't go past the Initialize Component(); line in my code. It comes up with an error of, "BadImageFormatException was unhandled" which i think is because of the system change of where i am opening it. Any help on this we be brilliant.
Thanks
The problem you are faced with is that you have compiled the app with Any CPU. Change it to x86 and recompile.
Most likely you have a library you are dependent on which is x86. Because your app is compiled as Any CPU, the Win7 x64 system is loading it as a 64bit app... and failing when trying to load the 32 bit library.
In Build->Configuration Manager, is your Platform set to "Any CPU" for each project?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With