title: Deploy Web Service to Nuget Package
body: <p>I have several WCF and WebAPI services as well as MVC websites in a visual studio solution.  Currently, we are creating WebDeploy packages for these services and websites to deploy to IIS.  I'm starting to look into Octopus Deploy for deploying our services and websites instead of WebDeploy.  However, Octopus Deploy uses Nuget packages to deploy.</p>
  
  <p>I'm trying to figure out how I can easily create a Nuget package that contains all the files that would normally be published into a WebDeploy package.  This may not be all files in the project directory or the bin directory.  I found <a href="http://ihadthisideaonce.com/2014/02/24/nuget-like-a-pro-the-msbuild-way/" rel="nofollow">this</a> blog post describing how to package a csproj into a Nuget package during the build, but I found that the resulting package didn't contain any of my dependency dll's.  I realize I could write a nuspec for each of these projects manually and include exactly the files I want, but I'm looking for a more automatic way as this would create more maintenance when my project changes.</p>
  
  <p>Does anyone out there know a good way to generate a nuspec or Nuget package that contains only the files needed to run the application, similar to the way publishing to a WebDeploy package only includes the files it needs?</p>