Skip to content

Conversation

@Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Dec 26, 2025

Summary

  • load each plugin in its own AssemblyLoadContext with AssemblyDependencyResolver
  • avoid AppDomain.AssemblyResolve for plugin dependencies

Testing

  • not run (not requested)

@github-actions github-actions bot added the N4 label Dec 26, 2025
}

private static Assembly? CurrentDomain_AssemblyResolve(object? sender, ResolveEventArgs args)
private sealed class PluginLoadContext : AssemblyLoadContext
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move it to a separate file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @Jim8y

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@superboyiii could you test it? I remember that a solution like this produce some errors in the past

Comment on lines +97 to +98
File.Copy(sourcePluginPath, pluginAssemblyPath, true);
File.Copy(sourceDependencyPath, Path.Combine(pluginRoot, $"{DependencyAssemblyName}.dll"), true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ut is not cleaned, we should delete the folder after execute it

@ajara87
Copy link
Member

ajara87 commented Dec 29, 2025

take a look of #4225 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants