title: Excluding File From Publish Directory in VS 2017 .NET Core Project
body: <p>I have a <code>.gitignore</code> file in the <code>wwwroot</code> folder of my project that I am trying to exclude from being published. The following code does not seem to work:</p>
  
  <pre><code>&lt;ItemGroup&gt;
    &lt;Content Include="wwwroot\.gitignore"&gt;
      &lt;CopyToPublishDirectory&gt;Never&lt;/CopyToPublishDirectory&gt;
    &lt;/Content&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>When I publish the project using the <code>dotnet publish</code> command, the <code>.gitignore</code> file is still found in the output directory.</p>