title: Error Publishing with /p:PublishSingleFile=true Flag
body: <p>I am trying to compress my program to a single executable. I am following instructions specified here: <a href="https://dotnetcoretutorials.com/2019/06/20/publishing-a-single-exe-file-in-net-core-3-0/" rel="noreferrer">https://dotnetcoretutorials.com/2019/06/20/publishing-a-single-exe-file-in-net-core-3-0/</a></p>
  
  <p>When I run my code without /p:PublishSingleFile=true, it works but a single file is not generated (as expected). When I add the aforementioned flag I get the following:</p>
  
  <pre><code>C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018: The "GenerateBundle" task failed unexpectedly. [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018: System.ArgumentException: Invalid input specification: Found multiple entries with the same BundleRelativePath [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018:    at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs) [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore() in /_/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs:line 36 [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 47 [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(801,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\Users\igorc\Work\ZConsole\ZConsole\ZConsole.csproj]
  </code></pre>
  
  <p>I thought it was an environmental problem, so I created a "HelloWorld" console app, and ran the same script there, it worked and generated a single executable.</p>
  
  <p>All projects are compiled under .NETCORE3.0.</p>
  
  <p>Here is what my ZConsole.csproj looks like:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;ApplicationIcon&gt;logo.ico&lt;/ApplicationIcon&gt;
      &lt;StartupObject&gt;ZConsole.ZConsole&lt;/StartupObject&gt;
      &lt;PackageRequireLicenseAcceptance&gt;false&lt;/PackageRequireLicenseAcceptance&gt;
      &lt;GeneratePackageOnBuild&gt;false&lt;/GeneratePackageOnBuild&gt;
      &lt;RuntimeIdentifier&gt;win10-x64&lt;/RuntimeIdentifier&gt;
      &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;
      &lt;PublishTrimmed&gt;true&lt;/PublishTrimmed&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="log4net" Version="2.0.8" /&gt;
      &lt;PackageReference Include="log4net-loggly" Version="9.0.0" /&gt;
      &lt;PackageReference Include="Nancy" Version="2.0.0" /&gt;
      &lt;PackageReference Include="Nancy.Hosting.Self" Version="2.0.0" /&gt;
      &lt;PackageReference Include="Newtonsoft.Json" Version="12.0.2" /&gt;
      &lt;PackageReference Include="System.IO.Ports" Version="4.6.0-preview4.19114.5" /&gt;
      &lt;PackageReference Include="Topshelf" Version="4.2.1" /&gt;
      &lt;PackageReference Include="WebSocketSharp-NonPreRelease" Version="1.0.0" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include="..\ZWaveDll\BasicApplication\BasicApplication_netcore.csproj" /&gt;
      &lt;ProjectReference Include="..\ZWaveDll\Utils\Utils_netcore.csproj" /&gt;
      &lt;ProjectReference Include="..\ZWaveDll\ZWaveXml\ZWaveXml_netcore.csproj" /&gt;
      &lt;ProjectReference Include="..\ZWaveDll\ZWave\ZWave_netcore.csproj" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Compile Update="AssemblyInfo.cs"&gt;
        &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;
      &lt;/Compile&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;None Update="App.config"&gt;
        &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;
      &lt;/None&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Thanks for the help!</p>