title: ASP.NET Core Publish Exclude Folder (or .json files)
body: <p>I have an asp core 2.1 project, and I'm trying to publish via web deploy.</p>
  
  <p>I have a folder called "Angular" and inside that are my source files (including some .json files for angular's config) - these get built (via a separate process "ng build") into the wwwroot/app directory ready for publish. As such, I want NOTHING from this Angular directory to end up on the published folder. But I still want the Angular folder to show up in the project / solution explorer / find in files.</p>
  
  <p>At present, it is publishing the Angular folder with all .json files inside. Obviously this is bad and I need to stop this from happening. I'm pretty sure this is happening because of this...
  <a href="https://github.com/aspnet/websdk/blob/dev/src/ProjectSystem/Microsoft.NET.Sdk.Web.ProjectSystem.Targets/netstandard1.0/Microsoft.NET.Sdk.Web.ProjectSystem.props#L32" rel="noreferrer">https://github.com/aspnet/websdk/blob/dev/src/ProjectSystem/Microsoft.NET.Sdk.Web.ProjectSystem.Targets/netstandard1.0/Microsoft.NET.Sdk.Web.ProjectSystem.props#L32</a></p>
  
  <p>I am publishing using the following command:</p>
  
  <pre><code>dotnet publish C:\blah\ -c Release /p:PublishProfile=WebDeployProfile
  </code></pre>
  
  <p>(and also sometimes doing it via the Visual Studio Publish using the same profile, but less frequently - I notice that these function differently, which I find odd)</p>
  
  <p>I have tried so many different things, both in the .csproj and .pubxml, it's getting ridiculous, and I currently believe msbuild/deploy is a total mess, and quite broken.</p>
  
  <p>I am hoping someone can help me with what should be a supremely simple and easy thing to accomplish - exclude a folder from publish (whilst leaving it in the project).</p>