Skip to content

Instantly share code, notes, and snippets.

View NekkoDroid's full-sized avatar
:octocat:
Yes, I guess...

Michael Ferrari NekkoDroid

:octocat:
Yes, I guess...
View GitHub Profile
@NekkoDroid
NekkoDroid / PluginLoaderContext.cs
Created April 30, 2022 18:44
C# plugin-system (single custom ALC with shared assemblies)
public class PluginLoadContext : AssemblyLoadContext
{
public PluginLoadContext(string? name, bool isCollectible = false) : base(name, isCollectible)
{
}
public void AddDependencyResolver(string componentAssemblyPath)
{
var resolver = new AssemblyDependencyResolver(componentAssemblyPath);