title: Dotnet Publish to Same Folder
body: <p>What is the expected behavior when different, <strong>independent</strong> .csproj projects are built/published to the same folder using <code>dotnet publish</code>?</p>
  <p>Imagine that <code>Alpha.csproj</code> might require NuGet package <code>foo</code> at 1.0.0, and that project <code>Bravo.csproj</code> might require version 2.0.0 of the same NuGet dependency.  My concern is that two separate <code>dotnet publish</code> invocations on these distinct projects, pointed at the same target folder, will cause the <code>foo</code> dependency to be overwritten...thus breaking the deployment.</p>
  <p>I know that NuGet often stores its binaries in subfolders, often distinguished by version numbers, but it is also common that it places the dependencies directly into the main publish-folder.  So, at face value there is room for unexpected conflicts.</p>
  <p>So far the way I've solved this <strong>anticipated</strong> problem is to place both projects into the same solution, and then publish the solution. I figure that a single publish command is smart enough to resolve the differences (storing different dependency versions of <code>foo</code> into different subfolders). However, what if these projects are in different solutions?</p>
  <p>I say &quot;anticipated&quot; problem because I've not actually spent time trying it.  I have tight deadlines and can't afford to deal with potentially obscure bugs emerging at runtime; I don't want to discover the answer to my question &quot;the hard way.&quot;</p>
  <p>Understanding this dynamic is particularly important for me, because I'm building .Net Core 3.1 plugins that I'd like to publish/deploy to an existing framework folder.  The application is designed to scan for new plugins and load them.</p>