Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssemblyResolver shouldn't be static. #2

Closed
Federerer opened this issue Oct 17, 2021 · 2 comments
Closed

AssemblyResolver shouldn't be static. #2

Federerer opened this issue Oct 17, 2021 · 2 comments

Comments

@Federerer
Copy link
Contributor

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.

@mikeoliphant
Copy link
Owner

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:

dotnet/wpf#1700

I have stopped using WPF for plugin UIs for this reason, among others...

@mikeoliphant
Copy link
Owner

I have now committed the change to make the load context not be shared across plugin instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants