Skip to content

Commit d69957a

Browse files
committed
Mono needs a real path, not just a filename.
1 parent 1d70e7f commit d69957a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Core/CoreFunctionsManager.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ public class CoreFunctionsManager : IDisposable
2727

2828
public CoreFunctionsManager()
2929
{
30-
internalCoreFunctionsHandle = NativeMethods.LoadLibrary(
31-
NativeMethods.IsUnix()
32-
? CoreFunctionsModuleUnix
33-
: CoreFunctionsModuleWindows
34-
);
30+
var libraryName = NativeMethods.IsUnix() ? CoreFunctionsModuleUnix : CoreFunctionsModuleWindows;
31+
32+
internalCoreFunctionsHandle = NativeMethods.LoadLibrary("./" + libraryName);
3533

3634
if (internalCoreFunctionsHandle.IsNull())
3735
{
38-
throw new Exception();
36+
throw new FileNotFoundException(libraryName);
3937
}
4038

4139
internalCoreFunctions = new InternalCoreFunctions(internalCoreFunctionsHandle);

0 commit comments

Comments
 (0)