title: Duplicate 'Content' items were included. The .NET SDK includes 'Content' items from your project directory by default
body: <p>Whenever I add a javascript or css file to my asp.net core project and I execute <code>dotnet run</code> in my bash terminal, I get the following error:</p>
  
  <blockquote>
    <p>/usr/share/dotnet/sdk/1.0.1/Sdks/Microsoft.NET.Sdk/build/Microsoft</p>
    
    <p>.NET.Sdk.DefaultItems.targets(188,5): error : Duplicate 'Content'
    items were included. The .NET SDK includes 'Content' items from your
    project directory by default. You can either remove these items from
    your project file, or set the 'EnableDefaultContentItems' property to
    'false' if you want to explicitly include them in your project file.
    For more information, see <a href="https://aka.ms/sdkimplicititems" rel="noreferrer">https://aka.ms/sdkimplicititems</a>. The
    duplicate items were: 'wwwroot/css/BasicQuotation.css';
    'wwwroot/js/BasicQuotation.js'
    [/mnt/c/Dev/myproject/MyProject/MyProject.csproj]</p>
    
    <p>The build failed. Please fix the build errors and run again.</p>
  </blockquote>
  
  <p>I can fix this by removing the <code>ItemGroup</code> from my csproj file, but I don't think that's very productive.</p>
  
  <p>This happens in the default Visual Studio 2017 ASP.NET Core Web Application (.NET Core) template. I add the files to my project by right clicking the wwwroot > js folder and then select <code>Add &gt; New Item &gt; JavaScript File</code></p>
  
  <p>This is my .csproj file:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp1.1&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;PropertyGroup&gt;
      &lt;PackageTargetFallback&gt;$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;&lt;/PackageTargetFallback&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;PropertyGroup&gt;
      &lt;UserSecretsId&gt;aspnet-MyProject-7e1906d8-5dbd-469a-b237-d7a563081253&lt;/UserSecretsId&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Compile Remove="wwwroot\lib\jquery-validation\**" /&gt;
      &lt;Content Remove="wwwroot\lib\jquery-validation\**" /&gt;
      &lt;EmbeddedResource Remove="wwwroot\lib\jquery-validation\**" /&gt;
      &lt;None Remove="wwwroot\lib\jquery-validation\**" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Content Include="wwwroot\css\BasicQuotation.css" /&gt;
      &lt;Content Include="wwwroot\js\BasicQuotation.js" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.1" PrivateAssets="All" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.1" PrivateAssets="All" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0" PrivateAssets="All" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.0" PrivateAssets="All" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Folder Include="Data\Commands\" /&gt;
      &lt;Folder Include="Data\Queries\" /&gt;
      &lt;Folder Include="wwwroot\images\" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>