Search code examples
nservicebusnservicebus5nservicebus6

Upgrade NServiceBus 5 to 6


I have an error after upgrading Nservicebus from version 5 to 6. This happening before calling Customize method in my MessageEndpoint. My MessageEndpoint inherited from IConfigureThisEndpoint, AsA_Server

API restriction: The assembly 'file:///PostSharp.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.


Solution

  • Are you including PostSharp.dll in your configuration code? If you do, note that there were assembly scanning changes in NServiceBus version 6. Rather than including assemblies, an "exclude list" approach is used and you'll need to use the API to exclude only. Everything else will be automatically scanned. Full documentation on assembly scanning for version 6 can be found here.