Hello,
I begin use SFML with C# and I've see a youtube video for display window but I have a error
(I use Rider)
This is the error
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'sfmlnet-graphics-2, Versio
n=2.2.0.0, Culture=neutral, PublicKeyToken=null'. Tentative de chargement d'un programme de format incorrect.
at French_Master_Game_Jam_1.Program.Main(String[] args)
MyCode
Program.cs
using System;namespace FrenchMasterGameJam1
{ class Program
{ static void Main
(string[] args
) { RPG game
= new RPG
(); game
.Run(); } }} Game.cs
using SFML.Graphics;using SFML.Window;namespace FrenchMasterGameJam1
{ public abstract class Game
{ protected RenderWindow window
; protected Color clearColor
; public Game
(uint width,
uint height,
string title, Color clearColor
) { this.window = new RenderWindow
(new VideoMode
(width, height
), title, Styles
.Close); this.clearColor = clearColor
; } public void Run
() { LoadContent
(); Initialize
(); while (this.window.IsOpen) { this.window.DispatchEvents(); Update
(); this.window.Clear(clearColor
); Render
(); this.window.Display(); } } protected abstract void LoadContent
(); protected abstract void Initialize
(); protected abstract void Update
(); protected abstract void Render
(); }} Main.cs
using SFML.Graphics;
namespace FrenchMasterGameJam1
{
public class RPG : Game
{
public RPG() : base(600, 800, "Test", Color.Blue)
{
}
protected override void Initialize()
{
}
protected override void LoadContent()
{
}
protected override void Update()
{
}
protected override void Render()
{
}
}
}
I have look all dll (SFML) is copied in the debug directory
Thanks for help