title: EnableDefaultCompileItems issue. Compile Include items being added at build time
body: <p>I'm currently trying to migrate old csproj files to the dotnet core styles ones.</p>
  <p>I have a bare bones csproj file like</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot; ToolsVersion=&quot;Current&quot;&gt;
    &lt;PropertyGroup&gt;
      &lt;PackageTags&gt;build-$(BUILD_BUILDID)&lt;/PackageTags&gt;
      &lt;GeneratePackageOnBuild&gt;true&lt;/GeneratePackageOnBuild&gt;
      &lt;AssemblyName&gt;Something&lt;/AssemblyName&gt;
      &lt;AssemblyTitle&gt;Something&lt;/AssemblyTitle&gt;
      &lt;AssemblyProduct&gt;Something&lt;/AssemblyProduct&gt;
      &lt;Description&gt;Something&lt;/Description&gt;
      &lt;ProjectGuid&gt;SomeGuid&lt;/ProjectGuid&gt;
      &lt;EnableDefaultCompileItems&gt;true&lt;/EnableDefaultCompileItems&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;SomeReference&quot; Version=&quot;6.0.2&quot; /&gt;
      &lt;PackageReference Include=&quot;SomeReference&quot; Version=&quot;3.4.0&quot; /&gt;
      &lt;PackageReference Include=&quot;SomeReference&quot; Version=&quot;4.7.0&quot; /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include=&quot;System.Configuration&quot; /&gt;
      &lt;Reference Include=&quot;System.Configuration.Install&quot; /&gt;
      &lt;Reference Include=&quot;System.ServiceProcess&quot; /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>Visual Studio is happy with this but excludes all of my code. I've tried to explicitly set EnableDefaultCompileItems to true ( as above ) but nothing happens even after a project unload / load.</p>
  <p>If I try to 'Include in Project' via 'Show All Files' then I get a bunch of 'Compile Include' elements being added at build time:</p>
  <pre><code> &lt;ItemGroup&gt;
      &lt;Compile Include=&quot;Class1.cs&quot; /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  <p>Which produces the following error</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State   Suppression State
  Error       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. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'Class1.cs'   Some.Project.Name   
      
  </code></pre>
  <p>This seems to suggest VS already knows the file exists but isn't displaying it in solution explorer or including it in a compile. Has anyone come across this issue before?</p>
  <p>VS version info:</p>
  <pre><code>Microsoft Visual Studio Enterprise 2019
  Version 16.3.4
  VisualStudio.16.Release/16.3.4+29409.12
  Microsoft .NET Framework
  Version 4.8.03752
  </code></pre>