Fixed marmalade dependency loading. In case your marmalade has other dependencies they will be correctly loaded now. Note: Make sure to not publish any other DLLs besides the ones you are sure you will need, as there can be version conflicts which didn't happen before. For example if you have a EllieMarmalade.dll which is a different version in the data/marmalade/mymarmalade folder, your marmalade will now break, as this fix will now (correctly) try to load it and there will be a version mismatch between the attributes. In a future patch i'll try to mitigate this by not loading dlls which are already loaded by the bot (even if their versions are different) but this might cause new issues as sometimes you do need different version of libraries for marmalade... The best option is to just keep what you need, and make sure to remove any other dlls
This commit is contained in:
parent
8ec4e6cbb0
commit
3195377e25
1 changed files with 2 additions and 2 deletions
|
@ -330,9 +330,9 @@ public sealed class MarmaladeLoaderService : IMarmaladeLoaderService, IReadyExec
|
|||
throw new FileNotFoundException($"Marmalade dll not found: {path}");
|
||||
|
||||
strings = MarmaladeStrings.CreateDefault(dir);
|
||||
var ctx = new MarmaladeAssemblyLoadContext(Path.GetDirectoryName(path)!);
|
||||
var ctx = new MarmaladeAssemblyLoadContext(path);
|
||||
var a = ctx.LoadFromAssemblyPath(Path.GetFullPath(path));
|
||||
ctx.LoadDependencies(a);
|
||||
// ctx.LoadDependencies(a);
|
||||
|
||||
// load services
|
||||
iocModule = new MarmaladeNinjectIocModule(_cont, a, safeName);
|
||||
|
|
Loading…
Reference in a new issue