Following the steps given on this thread (
http://en.sfml-dev.org/forums/index.php?topic=7674.0), I managed to setup SFML.Net 2.0 with Visual Studio C# 2012. However, I get the following error whenever I actually try to build something that references the SFML library...
An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'sfmlnet-graphics-2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
According to this page (
http://msdn.microsoft.com/en-us/library/system.badimageformatexception.aspx), the file image of the sfmlnet-graphics-2 DLL is "invalid."
The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.
Any ideas about what I may have done wrong?
Thanks!
EDIT: After some more research it appears this is a problem with discrepancies between x64 or x86 builds (
http://en.sfml-dev.org/forums/index.php?topic=9917.0). If I change the CPU settings to "prefer x64" (I am using 64-bit SFML), then the build succeeds. So my question is what happens if my user wants to run the game on a x86 system? Do I need to include DLLs of both x64 and x86 versions of SFML? How do I do this?
EDIT #2: Here's yet another thread about this issue (
http://en.sfml-dev.org/forums/index.php?topic=2405.0) but, my question remains. What is the permanent solution?