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

Author Topic: nuget package not working  (Read 4722 times)

0 Members and 1 Guest are viewing this topic.

smurf

  • Newbie
  • *
  • Posts: 36
    • View Profile
nuget package not working
« on: September 16, 2022, 03:00:37 am »
I've been using SFML/C#/Visual Studio for a long time. But as I recall the initial setup was difficult. I had to download the right DLLs and put them in the right places, and reference them correctly. It was not fun.

Anyway I noticed there is a new version of SFML out AND it supports nuget. Yay!

I removed my old dlls and installed the nuget package. But now things don't work :(

I get an error saying DllNotFoundException: Unable to load DLL 'csfml-graphics': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

So I thought maybe the nuget package is only the C# bindings, and not the actual libraries. So I downloaded the 2.5 dlls from the site and put them in what I thought was the correct folders. But things are still not working!

Can anyone please advise what to do next? I use nuget a lot at work and it always "just works"

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11038
    • View Profile
    • development blog
    • Email
Re: nuget package not working
« Reply #1 on: September 20, 2022, 08:38:44 pm »
Make sure you're using .NET Core up to .NET 6 and not .NET framework, otherwise you may need some workarounds with DLL loading for CSFML.

Additionally, I recommend to download CSFML 2.5.1 which contains some fixes.
And you need to either pick x86 or x64 instead of AnyCPU, as the CSFML libraries are architecture specific.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

smurf

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: nuget package not working
« Reply #2 on: September 23, 2022, 05:17:45 am »
Thank you I will try it out.