title: Dotnet publish not publishing DLL to publish directory
body: <p>I want to publish my self contained .NET Core (2.2) application, however one specific NuGet package (<code>Microsoft.Management.Infrastructure</code>) is never published to the <code>publish</code> folder (as in the .dll file is not present).</p>
  
  <p>I'm using the command <code>dotnet publish -c Release --self-contained -r win-x64 ConsoleApp1</code>. When running the application inside visual studio, everything works. However when running the compiled executable, I get a <code>FileNotFoundException</code>:</p>
  
  <blockquote>
    <p>Unhandled Exception: System.IO.FileNotFoundException: Could not load
    file or assembly 'Microsoft.Management.Infrastructure,
    Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    The system cannot find the file specified.    at
    ConsoleApp1.Program.Main(String[] args)</p>
  </blockquote>
  
  <h1>To reproduce</h1>
  
  <p>1) Create a simple .NET Core console app (I tested both 2.1 and 2.2, no difference)<br>
  2) Add the NuGet package <code>Microsoft.Management.Infrastructure</code><br>
  3) Add the following code to the application:</p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace ConsoleApp1
  {
      internal class Program
      {
          private static void Main(string[] args)
          {
              var sessionOptions = new DComSessionOptions
              {
                  Timeout = TimeSpan.FromSeconds(30)
              };
  
              CimSession Session = CimSession.Create("localhost", sessionOptions);
  
              var processors = Session.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_Processor");
              foreach (CimInstance processor in processors)
              {
                  Console.WriteLine(processor.CimInstanceProperties["Name"].Value);
              }
  
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>4) Publish the project: <code>dotnet publish -c Release --self-contained -r win-x64 ConsoleApp1</code><br>
  5) Run the compiled executable</p>