title: Sharing WCF contracts for client and server
body: <p>There are 2 teams working on a product. One team is working on a server-side logic, exposed as a WCF service, the other team is working on implementing a front end (ASP.NET MVC web-site). What is a proper solution for sharing service API between those 2 teams? By API I mean a web-service interface + a bunch of DTO classes. We're using git and TeamCity for continuous integration. Service and front-end are developed and deployed independently.</p>
  
  <p>Based on this, options I see are:</p>
  
  <ol>
  <li>Put all "interfacing" stuff into a separate project and share it via git modules. Both client and server will share the code.</li>
  <li>Put all "interfacing" stuff into a separate project and publish it to private NuGet repository. Both client and server will reference the only common assembly.</li>
  <li>Put both client and server to the single VS solution and literally share the assembly.</li>
  </ol>
  
  <p>Option 3 feels like the most trivial approach, easy to implement and understand, but I'm not really excited with the entire idea of getting a larger solution. Options 1 and 2 feel pretty the same, though I just like option 2 better.</p>
  
  <p>What do you think is a better approach here? Any other solutions?</p>