title: what is major difference between dotnet publish and dotnet pack
body: <p>What is the major difference between dotnet <code>pack</code> and <code>publish</code>?</p>
  
  <p>From <a href="https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet" rel="noreferrer">Microsoft's description</a>, my understanding is that <code>pack</code> creates a package while <code>publish</code> creates package + DLL.</p>
  
  <p>Is this correct? 
  If so, why not just always use <code>publish</code> and not use the DLL file if it is not needed.</p>