title: How to prevent Visual Studio from "publishing" XML documentation files in web projects?
body: <p><strong>Note:</strong> This question is similar to <em><a href="https://stackoverflow.com/questions/3980958/how-to-prevent-the-copy-of-xml-documentation-files-in-a-release-mode-build">How to prevent the copy of XML documentation files in a release mode build?</a></em>, but it's not the same and the answers there don't apply. Read on to find out why. (Please ask in the comments or in chat if you disagree, I'll be glad to elaborate).</p>
  <hr />
  <p>I have a library project (myLibrary) and an ASP.NET web application project referencing this library (both are in the same solution). &quot;Generate XML documentation file&quot; is checked for the library project, because I want to have those nice IntelliSense features while developing.</p>
  <p>When I <strong>publish</strong> the web application (Context Menu on the project/Publish...), it copies only the files required for running the application (no source code, etc.) to some publish directory. That's good. Unfortunately, it also copies the XML documentation file of the library. Since I consider our library's documentation to be a trade secret, I wouldn't want it to end up on a customer's server. Thus, we have to remember to manually remove this file from the publish directory before deploying it.</p>
  <p>Is there a way to <em>prevent</em> Visual Studio from copying this file when publishing the ASP.NET project, but still retain the benefit of XML documentation IntelliSense when developing?</p>