Assembly scanning changes in Version 6

Component: NServiceBus
This page targets a pre-release version and is subject to change prior to the final release.

Nested Directories

The default behavior of Version 6 is to not scan nested directories for assemblies. This behavior can re-enable using the Assembly Scanning API.

Include moved to Exclude

The API has been changed to an "Exclude a list" approach. See Assemblies to scan for more information.

7-pre NServiceBus
endpointConfiguration.AssemblyScanner().ExcludeAssemblies(
    "BadAssembly1.dll",
    "BadAssembly2.dll");
6.x NServiceBus
endpointConfiguration.AssemblyScanner().ExcludeAssemblies(
    "BadAssembly1.dll",
    "BadAssembly2.dll");
5.x NServiceBus
var excludesBuilder =
    AllAssemblies.Matching("NServiceBus")
        .And("MyCompany.")
        .Except("BadAssembly1.dll")
        .And("BadAssembly2.dll");
busConfiguration.AssembliesToScan(excludesBuilder);

Related Articles


Last modified