title: .NET 5 not compiling to single file executables
body: <p>I'm having an issue regarding trying to compile my .NET 5 application to a single file executable while debugging through Visual Studio.</p>
  <p>My .csproject file is below.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;net50&lt;/TargetFramework&gt;
      &lt;AutoGenerateBindingRedirects&gt;false&lt;/AutoGenerateBindingRedirects&gt;
      &lt;RuntimeIdentifier&gt;win-x64&lt;/RuntimeIdentifier&gt;
      &lt;PublishSingleFile&gt;true&lt;/PublishSingleFile&gt;
      &lt;IncludeNativeLibrariesForSelfExtract&gt;true&lt;/IncludeNativeLibrariesForSelfExtract&gt;
      &lt;PlatformTarget&gt;x64&lt;/PlatformTarget&gt;
    &lt;/PropertyGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>I have my runtime identifier set to <code>winx64</code> and publish single file set to true, yet when building I'm left with a bunch of DLLs that my application uses building along-side it (a total of 272 in total). I was wondering - how would I package these DLLs into this application? I had thought that publishing it as a single file executable would do that already.</p>
  <p><a href="https://i.stack.imgur.com/rHN3a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rHN3a.png" alt="Picture of DLLs along side EXE" /></a></p>