title: .NET Core - how does the 'dotnet publish' command work?
body: <p>I have a solution with some projects targeting .NET Standard 2.0 and a console application project targeting .NET Core 2.1.</p>
  <p>I set &quot;myFolder&quot; as the output folder.
  Building from Visual Studio, I get all DLL files in:</p>
  <ul>
  <li>&quot;myFolder\netstandard2.0&quot;</li>
  <li>&quot;myFolder\netcoreapp2.1&quot;</li>
  </ul>
  <p>I get the same using the &quot;dotnet build&quot; command.
  Now I need my console application's EXE file.
  So I use the &quot;dotnet publish -c Release -r win-x64 MySolution.sln&quot; command.</p>
  <p>Now I get this new directory, &quot;myFolder\netcoreapp2.1\win-x64&quot;, where I find all DLL files and the console application's EXE file.</p>
  <p>Not enough!</p>
  <p>I find one directory more, &quot;myFolder\netcoreapp2.1\win-x64\publish&quot;, where I find again all DLL files and the console application's EXE file.</p>
  <p>Which meaning do they have? I read the <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21" rel="noreferrer">command documentation</a>, but I didn't find my answer.</p>