All entries here should be taken with a big pinch of salt. There are my notes whilst playing around with NServiceBus. If you see something is wrong then feel free to let me know.
Configuring your DLL project to run as a host
One not-so obvious gotcha is that to use the NServiceBus.Host.Exe your DLL must reference NServiceBus.Host.Exe. Ok maybe that is obvious, but when you go to the project properties to change the startup option to that exe it isn’t in your bin folder. You must build the project before it copies the EXE into the folder. So Build once then change the startup option.
The first thing that has caught me out is that I assumed that when you Bus.Publish a message it will go into a queue for subscribers to read the messages from. This looks like an incorrect assumption. If you publish a message and no-one has subscribed then the message is “lost”.
A little trick to avoid copying the NServiceBus.Host.exe to your bin manually (or having to compile) before changing your project properties is to modify your project file and add the following:
It looks like it stripped out the HTML tags of my previous comment.
Try adding this to your project file: