I am using Nhibernate in my MVC3 site. I have 4 tables in database and a service which is used by the site to get data from database. Now I am getting this error :
Could not load file or assembly 'Newtonsoft.Json, Version=3.5.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)
I found out that by installing the Newtonsoft.Json by NuGet instead of adding reference to its dll solves the problem, so I did that and it solved the problem. When i debug all works fine. But when I publish and upload on my staging server, it gives the error I mentioned above.
Also, please note that I have 3 methods in my service, but only one gives the error, rest all works fine. And even that one method works fine locally. Just cannot on staging.
Edit: Now i uninstall the Newtonsoft.Json by NuGet and then i added reference to Newtonsoft.Json dll kept in the Bin folder of the Project. Again its working locally but not on server.
Why so?
Please reply.
Thanks.