You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just installed the nuget package for SFML.net in a fresh .net framework 4.7.2 console project.
My code is super simple right now:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SFML.Graphics;
namespace SFMLTest
{
class Program
{
static void Main(string[] args)
{
SFML.Graphics.RenderWindow renderWindow = new RenderWindow(new SFML.Window.VideoMode(800, 600), "SFML Test");
}
}
}
I have copied csfml-Audio.dll, csfml-Graphics.dll, csfml-System.dll, csfml-Window.dll and openal32.dll to the output folder and yet I still get the following error message:
System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)'
Am I just being incredibly stupid or is something wrong here?
The text was updated successfully, but these errors were encountered:
We highly recommend to use .NET Core, as there are some issues (#174) with .NET framework and native libraries.
As for your description, it seems like a mismatch between architecture or library versions.
Where did you get the DLLs from?
For what architecture are you build your .NET application?
Thanks for the response!
It seems that "Prefer 32 bit" is ticked on by default for some reason, unticking that in Project > Properties > Build seems to fix the issue :)
I got the DLLs from the nuget package under CSFML.2.5.0\runtimes\win-x64.
I just installed the nuget package for SFML.net in a fresh .net framework 4.7.2 console project.
My code is super simple right now:
I have copied csfml-Audio.dll, csfml-Graphics.dll, csfml-System.dll, csfml-Window.dll and openal32.dll to the output folder and yet I still get the following error message:
System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)'
Am I just being incredibly stupid or is something wrong here?
The text was updated successfully, but these errors were encountered: