AssembleMe.Abstractions
2.0.1
dotnet add package AssembleMe.Abstractions --version 2.0.1
NuGet\Install-Package AssembleMe.Abstractions -Version 2.0.1
<PackageReference Include="AssembleMe.Abstractions" Version="2.0.1" />
<PackageVersion Include="AssembleMe.Abstractions" Version="2.0.1" />
<PackageReference Include="AssembleMe.Abstractions" />
paket add AssembleMe.Abstractions --version 2.0.1
#r "nuget: AssembleMe.Abstractions, 2.0.1"
#:package AssembleMe.Abstractions@2.0.1
#addin nuget:?package=AssembleMe.Abstractions&version=2.0.1
#tool nuget:?package=AssembleMe.Abstractions&version=2.0.1
AssembleMe
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
IProcessAssembliesto define what happens with each discovered assembly. Register as many processors as you need. - DI-native � integrates directly with
Microsoft.Extensions.DependencyInjectionvia a singleAddAssembler()call. - Abstractions package � reference only
AssembleMe.Abstractionsin 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
Related Projects
- AutoWire.MicrosoftDependencyInjection � automatic service registration built on AssembleMe
License
This project is licensed under the MIT License.
| Product | Versions 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. |
-
net8.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AssembleMe.Abstractions:
| Package | Downloads |
|---|---|
|
AssembleMe
Minimal assembly discovery and loading framework |
|
|
AutoWire.MicrosoftDependencyInjection
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.1 | 115 | 2/14/2026 |
| 2.0.0 | 165 | 2/6/2026 |
| 1.0.0 | 302 | 4/8/2024 |
| 0.3.0-alpha | 327 | 12/6/2023 |
| 0.1.0-alpha | 260 | 12/1/2023 |