title: Prevent VS from adding explicit compile tags to csproj
body: <p>I am aware of .NET Core's change to the .csproj file, and how the GLOB automatically detects *.cs files, as <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/csproj?WT.mc_id=DOP-MVP-5001511#default-compilation-includes-in-net-core-projects" rel="nofollow noreferrer">as documented here</a>. However, the issue is I am still running into a certain error upon compile.</p>
  <p>As documented in the above link, I keep getting the error:</p>
  <blockquote>
  <p>Duplicate Compile items were included. The .NET SDK includes Compile items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultCompileItems' property to 'false' if you want to explicitly include them in your project file.</p>
  </blockquote>
  <p>My project is picking up all *.cs files perfectly fine within the project directory. However, whenever I ** ADD A NEW** class (right click &gt;&gt; add new item), the following is also added into the .csproj:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;ItemGroup&gt;
      &lt;Compile Include=&quot;Base\Class1.cs&quot; /&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  <p>I know that simply removing this will prevent the error from occurring, since this explicit compile conflicts with the GLOB's implicit include. How can I stop this from happening?</p>
  <h2>EDIT</h2>
  <p>Here is my .csproj:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;netstandard2.0&lt;/TargetFramework&gt;
          &lt;LangVersion&gt;8&lt;/LangVersion&gt;
          &lt;NeutralLanguage&gt;en&lt;/NeutralLanguage&gt;
          &lt;Authors&gt;Phillip Smith&lt;/Authors&gt;
          &lt;Company&gt;Phillip Smith&lt;/Company&gt;
          &lt;Description&gt;.Net Standard library to read and write .m64 files for Mupen64&lt;/Description&gt;
          &lt;PackageIcon&gt;nugetIcon.png&lt;/PackageIcon&gt;
          &lt;PackageTags&gt;mupen, n64, m64&lt;/PackageTags&gt;
          &lt;EnableNETAnalyzers&gt;true&lt;/EnableNETAnalyzers&gt;
          &lt;PackageProjectUrl&gt;https://github.com/TimeTravelPenguin/MupenSharp&lt;/PackageProjectUrl&gt;
          &lt;RepositoryUrl&gt;https://github.com/TimeTravelPenguin/MupenSharp&lt;/RepositoryUrl&gt;
          &lt;GeneratePackageOnBuild&gt;true&lt;/GeneratePackageOnBuild&gt;
          &lt;Version&gt;1.0.3.5&lt;/Version&gt;
          &lt;Copyright&gt;Phillip Smith&lt;/Copyright&gt;
          &lt;PackageLicenseExpression&gt;&lt;/PackageLicenseExpression&gt;
          &lt;ApplicationIcon&gt;icon.ico&lt;/ApplicationIcon&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;PropertyGroup Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|AnyCPU'&quot;&gt;
          &lt;DocumentationFile&gt;D:\C#_Offline\MupenMovieEditor\MupenSharp\MupenSharp.xml&lt;/DocumentationFile&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Content Include=&quot;icon.ico&quot; /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;PackageReference Include=&quot;JetBrains.Annotations&quot; Version=&quot;2020.3.0&quot; /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Reference Include=&quot;System.ComponentModel.DataAnnotations&quot;&gt;
              &lt;HintPath&gt;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.ComponentModel.DataAnnotations.dll&lt;/HintPath&gt;
          &lt;/Reference&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;None Include=&quot;..\..\Images\nugetIcon.png&quot;&gt;
              &lt;Pack&gt;True&lt;/Pack&gt;
              &lt;PackagePath&gt;&lt;/PackagePath&gt;
          &lt;/None&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Compile Update=&quot;Resources\ExceptionsResource.Designer.cs&quot;&gt;
              &lt;DesignTime&gt;True&lt;/DesignTime&gt;
              &lt;AutoGen&gt;True&lt;/AutoGen&gt;
              &lt;DependentUpon&gt;ExceptionsResource.resx&lt;/DependentUpon&gt;
          &lt;/Compile&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;EmbeddedResource Update=&quot;Resources\ExceptionsResource.resx&quot;&gt;
              &lt;Generator&gt;ResXFileCodeGenerator&lt;/Generator&gt;
              &lt;LastGenOutput&gt;ExceptionsResource.Designer.cs&lt;/LastGenOutput&gt;
          &lt;/EmbeddedResource&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <h2>EDIT 2</h2>
  <p>Video demonstration:</p>
  <p><a href="https://youtu.be/3ZU-Ue-goaE" rel="nofollow noreferrer">https://youtu.be/3ZU-Ue-goaE</a></p>