title: .net core load *.deps.json at runtime to load correct version of dependant assemblies
body: <p>In an <code>ASP.NET</code> Core 3.0 application, I have a Main project attempting to load plugin assemblies at runtime.  The main project contains some interfaces, but not implementations.
  Plugin assemblies DO reference the Main project and contain implementation for interfaces defined in the Main project.
  Once compiled, some plugins contain a <code>.deps.json</code> file specifying the correct location of its dependencies, according to some parameters, like the platform (notably, this is the case of <code>System.Data.SqlClient</code>, that has dependencies like:</p>
  
  <pre><code>runtimes/win-arm64/native/sni.dll
  runtimes/win-x64/native/sni.dll
  runtimes/win-x86/native/sni.dll
  ...
  </code></pre>
  
  <p>Of course, these plugin dependencies are not specified in the Main project's <code>.deps.json</code>. I would like to be able to load them at runtime.</p>
  
  <p>Note that manually merging the plugin <code>.deps.json</code> files to the Main project's <code>.deps.json</code> file successfully makes the project run (to automate the merging process, I wrote a simple console application [see: <a href="https://www.newtonsoft.com/json/help/html/MergeJson.htm" rel="nofollow noreferrer">https://www.newtonsoft.com/json/help/html/MergeJson.htm</a> ] to be launched in the post-build events, that merges all <code>.deps.json</code> files; note that merging the <code>.deps.json</code> files could cause issues like <a href="https://stackoverflow.com/q/56838166/1288109">Selenium .NET core 2.2 published project exe not running even on Windows x64</a> ). Anyway, this smells like not being a good solution. I'd rather prefer to scan <code>.deps.json</code> files associated with each plugin assembly and perform probing of dependencies accordingly, at runtime.</p>
  
  <p>I searched in other threads and articles, like <a href="https://stackoverflow.com/questions/40908568/assembly-loading-in-net-core">Assembly Loading in .NET Core</a> or <a href="https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support</a> , but I had no success.</p>
  
  <p>How can the job be performed?</p>