UPDATE I found the problem. I was not inheriting from ICommand so I added the convention however now i am receiving the following exception:
The destination queue 'Reimbursement' could not be found. You may have misconfigured the destination for this kind of message (Reimbursement.Messages.Commands.RequestForReimbursementCommand, Reimbursement.Messages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file. It may also be the case that the given queue just hasn't been created yet, or has been deleted.
I am evaluating NServiceBus for our company using the SqlTransport and I am running into a configuration issue.
Here is my app.config for my sender:
<configuration>
<configSections>
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
</configSections>
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<appSettings>
<add key="NServiceBus/Outbox" value="true"/>
</appSettings>
<connectionStrings>
<add
name="NServiceBus/Transport"
connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=CMS; Integrated Security=True;"/>
<add
name="NServiceBus/Persistence"
connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=CMS; Integrated Security=True;"/>
<add
name="NServiceBus/Transport/Reimbursement"
connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=Reimbursement; Integrated Security=True;"/>
</connectionStrings>
<UnicastBusConfig>
<MessageEndpointMappings>
<add Assembly="Reimbursement.Messages" Endpoint="Reimbursement" />
</MessageEndpointMappings>
</UnicastBusConfig>
</configuration>
When I go to send the command I receive the following exception:
No destination could be found for message type Reimbursement.Messages.Commands.RequestForReimbursementCommand. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.
The sender references the Reimbursement.Messages assembly so I’m not sure why it is unable to resolve this.
Any help would be great!