System.DllNotFoundException: can't load sfml.graphics

0

I've downloaded sfml from NuGet to develop with it in C#. I'm using the 2019 community version for C# and version 2.5 for sfml. With the code:

using SFML.Graphics;
using SFML.Window;

namespace sfml_test
{
    class Program
    {
        static void Main()
        {
            RenderWindow window = new RenderWindow(new VideoMode(200, 200), "test");
            CircleShape cs = new CircleShape(100.0f);
            cs.FillColor = Color.Green;
            window.SetActive();
            while (window.IsOpen)
            {
                window.Clear();
                window.DispatchEvents();
                window.Draw(cs);
                window.Display();
            }
        }
    }
}

I get the following error: System.DllNotFoundException: 'Can't load DLL csfml-graphics: Can't find given module. (Exception of HRESULT: 0x8007007E)'

I know that there already are some answers to similar questions, but these questions have been answered in 2010, with programs that don't seem to support Windows 10 (like Dependency Walker, I also did not understand the explanations.

Any help will be greatly appreciated and thank you in advance!

P.S. I'm trying to make a 2D ray tracer in C# and need a window to display it on. Most of the windows I can find are used for UI (Windows.Forms, GTK#) or are meant to work for 3D (OpenTK). Any suggestions are welcomed.

c#
dependencies
sfml
asked on Stack Overflow May 11, 2020 by Trashtalk • edited May 12, 2020 by Trashtalk

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0