kniEngine / kni

KNI is a cross-platform C# game framework.
Other
98 stars 5 forks source link

Failed to load library: SDL2.dll WindowsDX #1417

Closed Mootfrost777 closed 1 month ago

Mootfrost777 commented 1 month ago

When I am trying to run a WindowsDX(multiplatform project), it throws this error.

What version of MonoGame does the bug occur on:

What operating system are you using:

What MonoGame platform are you using:

nkast commented 1 month ago

WindowsDX doesn't use SDL. Probably you are referencing the DesktopGL library from a library, that makes it into the final \bin\ folder.

See *[1] for an example on how to use the Ref nuget with a Library. Remove the DesktopGL reference and add: <PackageReference Include="nkast.Xna.Framework.Ref" Version="3.11.9002" PrivateAssets="All" />

Since v3.11, Content, Graphics, Audio and Media classes have been decoupled. The core classes and Design were are already decoupled in v3.9. You'd only need the Ref library for Input and Game classes. Soon those will be moved on their own libraries, and we will no longer need a PrivateAssets Ref library to bait&switch.

*[1] https://github.com/kniEngine/kni/blob/main/Documentation/articles/migrate_381.md

I've opened a couple of Categories in https://github.com/kniEngine/kni/discussions, so for now on you can post user-issues there. I 'am closing this, since Issue are for verified bugs and planed features only.