Several weeks ago I changed my NServiceBus solution do a direct send of the message to the recipients that I need to get the message (changed from publishing).
That part of that involved creating new message contract assemblies. So where I needed MessageHub.Contracts.dll, I now needed Communication.InternalMessages.dll.
I changed my config to look like this:
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Communication.InternalMessages"
Endpoint="Communication" />
</MessageEndpointMappings>
</UnicastBusConfig>
It all works great. The new message types are used when NServiceBus fires a message received event. It all communicates fantastically.
Today, I noticed that my old MessageHub.Contracts.dll was in my debug folder. So I deleted it. Now when I run I am getting this error:
Inner Exception: System.ArgumentException: Problem loading message assembly:
ArupServiceBus.LisMessageHub.Contracts —>
System.IO.FileNotFoundException: Could not load file or assembly
‘LisMessageHub.Contracts’ or one of its dependencies.
The system cannot find the file specified.
What I have tried:
I have done a winGrep on my whole code tree and that file is not in there anywhere.
Further, no file has the word “LisMessageHub” in it (meaning that no config or project files are referencing this assembly.
I have checked to see if a MSMQ has a persistent reference to this queue as a publisher.
I am stumped. I have no idea what is causing NServiceBus to think it needs this file. If you know, please tell me…
It might be in your subscription storage – did you check there?