title: Sharing message definitions between NServiceBus services
body: <p><strong>Imaginative setup</strong></p>
  
  <ul>
  <li>Several services</li>
  <li>Each lives in its own repository</li>
  <li>Each developed separately</li>
  <li>Each deployed separately</li>
  <li>They want to communicate via NServiceBus</li>
  </ul>
  
  <p><strong>Research</strong></p>
  
  <p>Examples on NServiceBus basics show how several applications, which are part of the same solution, share message definitions using another <em>Shared</em> library project, that they all reference. Here, if services are not part of the same solution things become complicated.</p>
  
  <p>I suppose, shared project can be extracted into a separate repository and then be referenced from other repositories as a DLL or as a custom NuGet package, for example. But it creates a lot of difficulties during development and doesn't feel to be right.</p>
  
  <p>In this sample <a href="http://docs.particular.net/samples/step-by-step/">http://docs.particular.net/samples/step-by-step/</a>, there is even a note saying:</p>
  
  <blockquote>
    <p>Storing all message definitions in a single location is not a best
    practice, but serves to illustrate how things work for this simple
    example.</p>
  </blockquote>
  
  <p>However I yet failed to find what is a best practice.</p>
  
  <p><strong>Question</strong>: How to share message definitions between services in a proper way?</p>