I have a project which is shared between many applications called Core. Core has a reference to the Nuget package Newtonsoft which is used for various applications. When I create a new project and include a reference to Core, the project fails to run. The issue always ends up being because Newtonsoft is not included in the new project's app.config. This seems counterintuitive to me because only Core is directly calling Newtonsoft, not my new project.
The generated error: Could not load file or assembly 'Newtonsoft.Json, Version=X.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.
This is also a problem when the Newtonsoft dependency is updated. The <dependentAssembly> tag is generated in all app.config files on the current solution referencing Core when Newtonsoft is (re)installed on Core. If Core's version of Newtonsoft is upgraded to the next major, this will cause the same error of not being able to find Newtonsoft.
Is there a way to configure Core so that when added to other projects, it does not cause them to need the <dependentAssembly> tags in their own app.config files in order to work properly? Alternatively, is there a quick automated way to add/update the <dependentAssembly> child tag values to match the version in Core?