Click here to Skip to main content
15,747,766 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am working constantly on this app, for the past few months, everything was ok until this morning, I opend VS build the Solution, it went ok then as I tried to run the app I get this error to my horror, please help otherwise all the effort I put in it will go down the drain.

"Server Error in '/' Application.

SQL
Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Posted
Updated 17-Mar-14 0:15am
v2
Comments
Richard MacCutchan 17-Mar-14 5:46am    
The problem is as stated. The version of the assembly you are trying to reference cannot be found in the normal library search tree. Check your files and project settings.
Jahangir Khan 17-Mar-14 5:57am    
Thank you Richard, but now I am totaly confused and baffeled, I know have t pull my self togather, but kindly assit me where should I start step by step

Check your references - either one of the files is suddenly missing, or it has been "upgraded" and no longer matches the digital signature that VS expects.

First, look at each reference in your project, and check that the physical file is still there.
If they are, then remove each reference, close the dialog, and then add it back, one by one.

Chances are that will fix your problem - but then you need to find out what changed the file...
 
Share this answer
 
Comments
Jahangir Khan 17-Mar-14 10:33am    
Now after building I am getting these
1. Error 2 Assembly 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Users\JG\Documents\Visual Studio 2013\Projects\TrailApp\packages\Microsoft.AspNet.Mvc.5.1.1\lib\net45\System.Web.Mvc.dll TrailApp

2. Warning 1 Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. TrailApp
SQL
Hello,

Include your Newtonsoft.Json.dll file to your bin folder of your project so it will be there when you publish your project. Else, make sure you are copying the physical file Newtonsoft.Json.dll to the bin folder of published location.
 
Share this answer
 
This is a version problem.
Check the version of the NewtonSoft dll and ensure you are referencing the right dll version.

The web.config file contains a reference to this dll.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900