title: .net core application fails because of transient dependency
body: <p>.net core application fails with the following message:</p>
  <blockquote>
  <p>2021-05-06T11:48:20.114165977Z Unhandled exception. System.TypeInitializationException: The type initializer for 'Audit.Core.Configuration' threw an exception.
  2021-05-06T11:48:20.114232677Z  ---&gt; System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.</p>
  </blockquote>
  <p>My code doesn't have any explicit dependencies on Newtonsoft.Json, by inspecting the project.assets.json file I can see the following picture:</p>
  <ul>
  <li>App code depends on  Microsoft.Extensions.Configuration.AzureKeyVault depends on Microsoft.Azure.KeyVault which depends on &quot;Newtonsoft.Json&quot;: &quot;9.0.1&quot;.</li>
  <li>App code depends on Audit.EntityFramework.Core depends on &quot;Newtonsoft.Json&quot;: &quot;12.0.2&quot;</li>
  <li>App code depends on Audit.WebApi.Core depends on &quot;Newtonsoft.Json&quot;: &quot;12.0.2&quot;</li>
  </ul>
  <p>When I run <code>dotnet publish</code> command the Newtonsoft.Json version is always 9.0.0.0 in a published directory. My question is, how it would be possible to control the version of the Newtonsoft.Json so the higher version will be published during the build/publish.</p>