Closed Ellpeck closed 4 years ago
you are right, any dlls that be loaded by DllImport
cannot be moved. but unfortunately, NetCoreBeauty cannot determine whether a dll is manually loaded or not. i think the only way to solve this problem is that provide a BeautyExcludes
property to exclude dlls that you don't want to be moved or can not be moved. a fix will be available soon.
That sounds like a pretty good solution. Thanks!
adding <BeautyExcludes>SDL2*;libSDL2*;sdl2*</BeautyExcludes>
into csproj
file to avoid moving SDL2
.
reference:
https://github.com/MonoGame/MonoGame/blob/3b0df35ce1c73435f48953ccd2bb1a8b72c507be/MonoGame.Framework/Platform/SDL/SDL2.cs#L16-L26
UPDATE: after viewing the changes of commit 633b952099, adding openal
too for safe.
<BeautyExcludes>SDL2*;libSDL2*;sdl2*;soft_oal*;openal*</BeautyExcludes>
I'm using the MonoGame Framework for a project that I am trying to package with NetCoreBeauty. MonoGame loads its unmanaged dependencies (namely SDL) in an odd way, as seen here.
When running NetCoreBeauty on a simple example project and trying to run it, the
SDL2.dll
native library can't be found anymore. Moving that file from theruntimes
folder to the main folder manually fixes the issue.Here is a simple example project that you can use to recreate the issue: MLEMDesktopGLCoreTest.zip (When run successfully, this project simply displays a window with a black background.)