Failed to load SDL library.

Just now, I started getting this error upon running my project. As far as I know, nothing has changed, but realistically something probably got switched somehow.

  • Windows 10
  • DesktopGL

I have ensured that SDL2.dll is in the build folder - it’s actually set to copy there with each build.
I tried setting a reference to the DLL via VS (2015), but it says that it can’t on account of being not accessible or not “a valid assembly or COM component”. But, frankly, I don’t remember that being necessary in the first place.

Is there something else I’ve overlooked? Any other configuration files I need to check? Maybe a project file got corrupted? Again, it’s so weird that this just popped up today.

I’ m having the exact same behaviour, SDL is missing, i just upgraded to Core

I’m interested in this too. Is it something to do with the fact that .NET Core debug runs use the deps.json file to reference native libs instead of copying them into the bin like when you publish?

Updating my TargetFramework to netcoreapp3.1 fixed this. Note that it has basically the same support as netcoreapp2.1.