Page 1 of 1
Update reference request: Newtonsoft.Json
Posted: Wed Jun 28, 2017 7:18 pm
by BPalmer
Working on a new plugin, one of my plugin dependencies requires Newtonsoft.Json 10.0.2, OpenDentBusiness is currently referencing version 9.0.1. Could you please update this to the latest stable?
Thanks
Re: Update reference request: Newtonsoft.Json
Posted: Thu Jun 29, 2017 11:30 am
by jsalmon
No, we always have unintended side affects when it comes to updating dlls. We had many problems when we went from Newtonsoft.Json v7 to v9.
What I would be willing to do is increase the dependentAssembly node of our app.config that might let your customers use the new v10 dll. Can you manipulate the Open Dental app.config code to include your v10 information and let me know if it works? The code I'm referring to looks like this:
Code: Select all
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
Re: Update reference request: Newtonsoft.Json
Posted: Thu Jun 29, 2017 4:49 pm
by BPalmer
Thanks for your support, I was actually able to make it work without any changes on your end. Seems to be working just fine, from my understanding and from limited testing, this shouldn't break anything
Code: Select all
public override void LaunchToolbarButton(long patNum) {
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
}
private System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) {
return Assembly.LoadFrom("Newtonsoft.Json.v10\\Newtonsoft.Json.dll");
}