Well, the exception tells you exactly what it is. He is looking for some class that implements IConfigureThisEndpoint .
Three things come to mind:
- You forgot to implement it (see NServiceBus samples)
- You have implemented it, but your class is not public or internal
- You have more than one assembly in a folder or subfolder that contains your files that implement IConfigureThisEndpoint
- You have a mismatch between the framework versions of your assemblies and the NServiceBus assemblies, i.e. you are using NServiceBus compiled for .NET 3.5, but Visual Studio 2010 created your endpoint (default) as .NET 4.0. (dot added by David Boike )
- The DLL messages referenced by the failed subscriber are delayed. This leads to a crash with the error "There is no endpoint configuration ...". Building a strong named version of the DLL messages locally solves the problem. (dot added by thecolour )
- The exception "Missing endpoint config ..." seems to be thrown for various reasons, and this seems to mask the actual reason. The exception basically only says that the configuration cannot be found, but does not indicate what is the underlying cause of the problem. (dot added by thecolour )
- The version of NServiceBus we are using does not compile in .NET v4. Therefore, we need to create the configuration file NServiceBus.Host.exe.config , which configures the version of .NET used.
- Remember to install the above file NServiceBus.Host.exe.config , which will be copied to the / bin / Debug folder in the property windows. It happens to me all the time ...; -)
The NServiceBus.Host.exe.config file should look like this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <startup> <supportedRuntime version="v4.0" /> </startup> <runtime> <loadFromRemoteSources enabled="true" /> </runtime> </configuration>
I think the exception βNo endpoint config ...β seems to be thrown for many different reasons, and this kind of masks the actual reason. Does anyone know a good way to diagnose such problems?
The last point with me too. This happened after renaming my assembly and not clearing the project directory. NServiceBus then looked through all the files and found both the old named assembly and the new named assembly and ended up with the same exception.
Note that this also happens if a second assembly containing the same interface implementation can cause a tis error if it is inside a subfolder. This behavior caused me some debugging headaches, as I previously copied my file to a subfolder as a short-term backup ...
[change]
Edited to add additional elements by other authors in this thread for completeness.
[EDIT 2]
Additional information about NServiceBus.Host.exe.config .
source share