title: NServiceBus: Could not find Metadata for (message)
body: <p>I am attempting to publish a message as shown below</p>
  
  <pre><code>_bus.Publish(new BatchCompleted { BatchId = batch.Id});
  </code></pre>
  
  <p>And handle it in a BatchCompletedHandler:</p>
  
  <pre><code>public class BatchCompletedHandler: IHandleMessages&lt;BatchCompleted&gt;
  {
  
      public void Handle(BatchCompleted message)
      {
            Do Some Stuff...
      }
  }
  </code></pre>
  
  <p>Whenever I try and publish the message I get the following System.Exception:</p>
  
  <blockquote>
    <p>Could not find Metadata for 'MyAssembly.BatchCompleted'. Messages need to implement either 'IMessage', 'IEvent' or 'ICommand'. Alternatively, if you don't want to implement an interface, you can configure 'Unobtrusive Mode Messages' and use convention to configure how messages are mapped.</p>
  </blockquote>
  
  <p>The message <em>does</em> implement IEvent as shown below</p>
  
  <pre><code>[Serializable]
  public class BatchCompleted : IEvent
  {
      public int BatchId{ get; set; }
  }
  </code></pre>
  
  <p>I am configuring NSB using the following code</p>
  
  <pre><code>Configure.With(MyAssembly)
  </code></pre>
  
  <p>The message handler is in the assembly MyAssembly and the messages are in the MyMessagesAssembly.</p>
  
  <p>What am I doing wrong?</p>