Could not load file or assembly 'Newtonsoft.Json, Version=18.104.22.168
Please help me on this.
“Could not load file or assembly 'Newtonsoft.Json, Version=22.214.171.124, 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)”.
'NewtonsoftJson.dll’ assembly is required for posting to twitter .The version used is 126.96.36.199.
And the same assembly(but diff version 188.8.131.52) is used as the dependent assembly by facebook C# api(dll). However the above assembly(184.108.40.206) does not work for both the cases (ie for posting to twitter and for login to facebook). In order to solve it ,created a separate project for posting to twitter and reference the assembly(220.127.116.11) separately (in the project for twitter post).And another version(18.104.22.168) was added as reference in main project for facebook but still the error comes.If twitter project is disabled and ran then the facebook login works fine and vice vera.
I have done lot of research and tried the following.
delete temporary asp.net files clean solution restart computer
Even tried to uninstall the assembly from gac(however its not registered there).
Please help me on this as its not working.
1) Add both assemblies to your project.
2) Right click the first assembly and select Properties
3) Change the Aliases field from 'global' to something else, like 'Version4000'
4) Do the same with the second assembly, but with a different alias, 'Version4030'
5) add these lines to the top of your code file
extern alias Version4000;
extern alias Version4030;
6) When you need something from a specific assembly, prefix the alias:
Version4000::MyClass v4000Class = new Version4000::MyClass();
Version4030::MyClass v4030CLass = new Version4030::MyClass();