Im trying to run two versions of Newtonsoft.Json.dll
within my site as im using two different plug-ins requiring different versions of Newtonsoft.Json.dll
version 6 and version 9.
Came across this article Two different versions of Newtonsoft.Json.dll needed in ASP.NET MVC which is the same problem (but for Win forms if that makes any difference). So my web.config file looks like
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<codeBase version="6.0.0.0" href="Newtonsoft.Json.dll" />
<codeBase version="9.0.1.0" href="dlls\9.0.0.0\Newtonsoft.Json.dll" />
</dependentAssembly>
I know version 6 of NSJson works as everything was working until i added the second plugin. If i look at the dll's properties, under the Details tab i see File and Product version as 9.0.1.19813.
I then created a folder under the bin directory called dlls\9.0.0.0\Placed dll in here. If the version is listed as version="9.0.0.0"
i get the error
Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
If i change the version to version="9.0.1.0"
then i get
Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Which "seems" to imply that im closer to the solution rather than setting the version as 9.0.0.0 but i dont know how to see what manifest definitions its looking for or what it should be set to? Of course i could be totally wrong and wonder how i go about resolving this issue?