Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MEF and .NET Standard
var path = Path.Combine(AppContext.BaseDirectory, "Plugins");
var assemblies = Directory.GetFiles(path, "*.dll").Select(Assembly.LoadFile);
public class FileWriterNodeDefinition : INodeDefinition
var conventions = new ConventionBuilder();
var configuration = new ContainerConfiguration();
configuration.WithAssemblies(assemblies, conventions);
using (var container = configuration.CreateContainer())
var nodeDefinitions = container.GetExports<INodeDefinition>();
return nodeDefinitions;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.