Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: unable to load DLL error in csharp  (Read 8096 times)

0 Members and 1 Guest are viewing this topic.

Septagon

  • Newbie
  • *
  • Posts: 7
    • View Profile
unable to load DLL error in csharp
« on: November 05, 2019, 06:35:22 pm »
hello, long time game developer here with multiple shipped C++ SFML games. i am a big proponent of SFML and i am interested in trying out the dotnet version (specifically because of C# support) but have been having a few basic setup issues due to the relative sparseness of available tutorials.

the error i currently get is:
System.DllNotFoundException: 'Unable to load DLL 'csfml-graphics-2.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)'

additional information:
i am using the x64 version with vs community.
the extlibs are currently in the project folder. i added them via add > reference > browse but they do not show up in the list of assemblies with the /lib dlls.

clearly i am doing something wrong- could someone help me get through the initial setup? thank you in advance.

Septagon

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: unable to load DLL error in csharp
« Reply #1 on: November 05, 2019, 08:18:59 pm »
someone was able to resolve this!

in case anyone else has this problem, the extlibs can be added correctly by putting them in the project folder, then manually setting the properties of each. the property "copy to output directory" needs to be set to "copy if newer" because it defaults to not copying at all.

Balnian

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: unable to load DLL error in csharp
« Reply #2 on: December 07, 2019, 12:45:59 am »
I'm guessing you're making a .Net Framework project... it's a known bug. I would suggest you try a .net core project instead it also has support for linux and macos natively and doesn't require that workaround... (Except for macos... For now...)
Also usually .net core is faster than .Net Framework

And don't forget to share your final game with us!