Forum de la communauté SFML

Bindings - autres langages => DotNet => Discussion démarrée par: TheYoungGeek43 le Août 24, 2018, 03:21:14 pm

Titre: Erreur lors de la création de la fenetre
Posté par: TheYoungGeek43 le Août 24, 2018, 03:21:14 pm
Bonjour,
Je viens de débuter l'utilisation de la SFML et j'ai un problème je créer la fenetre et quand je lance j'ai une erreur j'ai créer la fenetre grace a un tuto sur Youtube et les DLL on étais prise sur le site officiel de la SFML (J'utilise Rider)

Voilà l'erreur

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)



 

Voilà mon code
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();
    }
}
 

RPG.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()
        {
        }
    }
}
 

j'ai regarder les dll se son bien copier dans le dossier debug
Je ne vois pas d'où viens l'erreur

Merci pour votre aide