title: Additional probing paths for .NET Core 3 migration
body: <p>Short version of the question:</p>
  <p>Is there any way in .NET Core 3 to specify a local probing path, using the same rules as the <code>&lt;probing&gt;</code> element from app.config? <code>additionalProbingPaths</code> does not seem to work.</p>
  <hr />
  <p>Long version of the question:</p>
  <p>I'm migrating a project from .NET Framework to .NET Core 3.  In the original project, I kept a number of secondary dlls in a lib/ folder.  This worked fine, as I set the probing path in <code>App.exe.config</code>, like so:</p>
  <pre class="lang-xml prettyprint-override"><code>  &lt;runtime&gt;
      &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
        &lt;probing privatePath=&quot;lib&quot; /&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  </code></pre>
  <p>However after converting the project to .NET Core 3, the program won't run, saying it can't find the dlls.  The <code>App.exe.config</code> is still there, and still being read/used, because it also contains info on System.Configuration parameters, and that part of the program still works fine.</p>
  <p>I've determined that there is a new json file that stores configuration information for the program, in <code>App.runtimeconfig.json</code>.  It's auto-generated, and does not contain additional probing paths by default, but the <code>App.runtimeconfig.dev.json</code> file contains some.</p>
  <p>Now, I can't use the paths that were in the .dev.json file because those point to local user directories, and are not acceptable for deployment. However I'm able to add my own version to the main runtimeconfig by using a template file (<code>runtimeconfig.template.json</code>) in the project directory.  This adds the property to the <code>runtimeOptions</code> grouping in the main runtimeconfig file.  The template code is:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;additionalProbingPaths&quot;: [
      &quot;lib&quot;   
    ]
  }
  </code></pre>
  <p>And the final output of the <code>App.runtimeconfig.json</code> file is:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;runtimeOptions&quot;: {
      &quot;tfm&quot;: &quot;netcoreapp3.0&quot;,
      &quot;framework&quot;: {
        &quot;name&quot;: &quot;Microsoft.WindowsDesktop.App&quot;,
        &quot;version&quot;: &quot;3.0.0-preview6-27804-01&quot;
      },
      &quot;additionalProbingPaths&quot;: [
        &quot;lib&quot;
      ]
    }
  }
  </code></pre>
  <p>However the relative path that I inserted does not seem to be getting used at all, whether I insert it into the main runtimeconfig file using the template, or just manually edit the dev.json file instead.  I've also tried a number of variations on how the directory is specified. The program always generates an error saying that the specified assembly was not found if it's not located in the root program directory.  The error says it's looking for <code>lib/netstandard2.0/HtmlAgilityPack.dll</code> (or other similar libraries) that it gets from the <code>App.deps.json</code> file.</p>
  <p>The workaround is to let all the libraries live in the root program directory, but since this used to work before, and I'd <em>expect</em> it to work now, I'd like to know what I'm doing wrong.  Attempting to use the diagnostic output in Visual Studio for more info fails because the program terminates before any diagnostic information is generated.</p>