If you’re trying to use the NServiceBus.Host.exe in a x64 system, you may encounter the following exception:
Unhandled Exception: System.InvalidOperationException: No endpoint configuration found in scanned assemblies. This usually happens when NServiceBus fails to load your assembly contaning IConfigureThisEndpoint. Try specifying the type explicitly in the NServiceBus.Host.exe.config using the appsetting key: EndpointConfig...
To fix this, make sure that all your projects target the same platform (x64 / x86) as your NServiceBus.Host.exe.
In my case the server dll and the messages dll were build with the x86 switch and the NServiceBus.Host.exe was built with “any cpu”. This combination threw an exception as soon as I started the exe-file. Creating a configuration file for the host and defining the EndPointConfigurationType in it didn’t help. Changing the server dll to be build with “any cpu” didn’t help. But changing both the server dll and the messages dll to use the “any cpu” switch immediately fixed the problem.