AssembleMe 2.0.1

dotnet add package AssembleMe --version 2.0.1
                    
NuGet\Install-Package AssembleMe -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AssembleMe" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AssembleMe" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AssembleMe" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AssembleMe --version 2.0.1
                    
#r "nuget: AssembleMe, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AssembleMe@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AssembleMe&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AssembleMe&version=2.0.1
                    
Install as a Cake Tool

AssembleMe

NuGet NuGet Downloads License: MIT

Minimal impact assembly discovery and scanning framework for .NET. Discover, scan and process assemblies from your filesystem or AppDomain with an easy plugin-like architecture.

Why AssembleMe?

Many .NET applications need to discover and process assemblies at startup � for plugin systems, automatic service registration, convention-based configuration, or module loading. AssembleMe provides a clean, extensible way to do this with first-class dependency injection support.

  • Two discovery modes � scan assemblies already loaded in the current AppDomain, or discover them from the filesystem (or both).
  • Plugin architecture � implement IProcessAssemblies to define what happens with each discovered assembly. Register as many processors as you need.
  • DI-native � integrates directly with Microsoft.Extensions.DependencyInjection via a single AddAssembler() call.
  • Abstractions package � reference only AssembleMe.Abstractions in your libraries to avoid coupling to the implementation.

Installation

# Main package (includes implementation + DI integration)
dotnet add package AssembleMe

# Abstractions only (for libraries that define processors)
dotnet add package AssembleMe.Abstractions

Quick Start

var serviceCollection = new ServiceCollection();

// Register one or more assembly processors
serviceCollection.AddTransient<IProcessAssemblies, MyAssemblyProcessor>();

// Configure and register the assembler
serviceCollection.AddAssembler(options =>
{
    options.AssembleAppDomainAssemblies = true;
    options.AssembleFileSystemAssemblies = true;
    options.AssembleFileSystemAssembliesRecursively = true;
    options.AssembleFromFileSystemDirectory = AppDomain.CurrentDomain.BaseDirectory;
});

var provider = serviceCollection.BuildServiceProvider();
var assembler = provider.GetRequiredService<IAssembler>();
assembler.Assemble();

Core Concepts

Assembly Processors

An assembly processor is any class that implements IProcessAssemblies. When Assemble() is called, each discovered assembly is passed to every registered processor. This is where you define your scanning logic � for example, finding types that implement a specific interface, applying attributes, or registering services.

public class MyAssemblyProcessor : IProcessAssemblies
{
    public void Process(Assembly assembly)
    {
        // Example: find and register all types implementing IMyPlugin
        var pluginTypes = assembly.GetExportedTypes()
            .Where(t => typeof(IMyPlugin).IsAssignableFrom(t) && !t.IsAbstract);

        foreach (var type in pluginTypes)
        {
            // Do something with the discovered types
        }
    }
}

You can register multiple processors, and they will all run for each discovered assembly:

services.AddTransient<IProcessAssemblies, PluginDiscoveryProcessor>();
services.AddTransient<IProcessAssemblies, AutoMapperProfileScanner>();
services.AddTransient<IProcessAssemblies, EventHandlerRegistrar>();

Configuration Options

Option Type Description
AssembleAppDomainAssemblies bool Scan assemblies currently loaded in the AppDomain.
AssembleFileSystemAssemblies bool Scan .dll files from the filesystem.
AssembleFileSystemAssembliesRecursively bool When scanning the filesystem, include subdirectories.
AssembleFromFileSystemDirectory string Root directory for filesystem assembly discovery.

Package Structure

Package Purpose Depends On
AssembleMe Implementation + DI registration AssembleMe.Abstractions, Microsoft.Extensions.DependencyInjection
AssembleMe.Abstractions Interfaces (IAssembler, IProcessAssemblies) Microsoft.Extensions.DependencyInjection.Abstractions

Reference AssembleMe.Abstractions in class libraries that define processors, and AssembleMe in your application entry point where you configure DI.

Requirements

  • .NET 8.0 or later

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 103 2/14/2026
2.0.0 95 2/6/2026
1.0.0 284 4/8/2024
0.3.0-alpha 278 12/6/2023
0.2.0-alpha 226 12/1/2023
0.1.4-alpha 157 11/30/2023
0.1.3-alpha 149 11/30/2023