I would like to see if anyone else has experienced difficulty with running an addin that references a newer version of an assembly that Revit itself already uses as a dependency?
Because of data management needs in my application, I would like to use Newtonsoft.Json version 12.0.3. However, when I run the debugger, I observe that by the time my addin has loaded, it has already bound to version 9.00.1.19813.
I can only assume the reason for this is that Revit 2020 already references a 2016 version of Newtonsoft.json, as shown in the program files and indicated by the debugger. As a result, none of the traditional fixes or remedies for alternate assembly binding appear to work. Even creating a Directory.Build.props file and setting the MSBuild properties
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
does not seem to resolve the reference to the latest version. It still throws an exception indicating that it has bound to version 9. As a result, I cannot get the functionality I need because it didn't exist in version 9.
Has anyone else encountered this problem or a similar scenario (screenshots attached for clarity)?