Closed Federerer closed 2 years ago
Yeah, I changed this locally a while back, but never committed it because I think it causes other potential problems.
If I recall correctly, I think I made it static because I was having trouble with WPF (specifically XAML) and multiple instances of the same plugin. There is an open dotnet issue that I believe is related:
https://github.com/dotnet/wpf/issues/1700
I have stopped using WPF for plugin UIs for this reason, among others...
I have now committed the change to make the load context not be shared across plugin instances.
Currently AssemblyResolver class and specifically
static AssemblyLoadContext^ loadContext = nullptr;
are static, which causes problems when I'm trying to load more than one plugin that are using AudioPlugSharp and are in different folders, because the second one tries to resolve assemblies from the first's location.