ASP.NET - How to remove Newtonsoft.Json dependency - asp.net

I added the reference file "Newtonsoft.Json.dll" to my project. After a while, I decided to remove the reference from References section of project. Projects started to give following error :
Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'Newtonsoft.Json, Version=4.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 tried everything. I searched any words with "Newtonsoft" in the project and delete all of them. But nothing changes. I am getting still this error. Can anyone help me? How can I remove this reference forever ?

I found the solution. The project requires "Newtonsoft.Json, Version=4.5.0.0", But I realized that I load the "Newtonsoft.Json, Version=6.0.0.0" version. After I add v6 dll file to project, the problem solved. Thanks for your responses.

Related

how to use combo box in asp.net

I have installed AjaxControlToolkit package and added those .dll files, also added them to reference. The problem is when I use ComboBox in the code it is showing error
Could not find schema information for the element
AjaxControlToolkit
error;
Could not load file or assembly 'AjaxControlToolkit, Version=17.1.1.0,
Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
how to fix this problem?

Can not load assembly for 'Microsoft.Owin'

I have an issue in asp.net web API where when I add Signlr class I get. I can see in the references Microsoft.Owin
Could not load file or assembly 'Microsoft.Owin' or one of its dependencies. >The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'Microsoft.Owin' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)
I suggest to check what you have in packages.config, web.config and packages folder. They all should link to the same package version. Quite often if you update version of some package via NuGet, there may raise compability issues.
P.S. If it not help you may delete and istall OWIN again via NuGet.
It seemed like you confused with SignalR project development. Please read this article.
Try removing the dependency from project.json and build the solution and then add it back.
Worked for me

Could not load file or assembly 'Autofac, Version=3.0.0.0

I am trying to connect enFinder file manager to my asp.net project with this connector. I added Autofac Version 3. Afterwards I removed the reference and added a reference to Autofac 2.6. Now the following error occurs:
Could not load file or assembly 'Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
How can I fix this problem?
Delete all Autofac references in your project and add them again, using the correct Autofac DLL. The mismatch occurs when the reference you've added to your project via the Add Reference menu is not the same version as the actual file. This happens when you exchange the physical DLL file on your disk to which the reference in your project points.

Newtonsoft.Json randomly not loading in NopCommerce

Up until yesterday we only saw this error once before when the site first went live but now it has happened two days consecutively.
This is the error:
Could not load file or assembly 'Newtonsoft.Json, Version=4.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)
So far, what seems to work is toggling the ClassLibrary > References > Newtonsoft.Json > "Copy Local" property (between True and False), then pushing the appropriate .dll's up.
Does anyone know why this references randomly becomes inaccessible?
I'm a .Net and NopCommerce noob so any advice or articles that would shed some light or point me in the right direction would be very helpful.

Could not load file or assembly

I am working on a project in asp.net using Telerik Controls.
Everytime when i run my project i am getting the following error:
Could not load file or assembly
'Microsoft.Practices.EnterpriseLibrary.Configuration.Design,
Version=3.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies.
The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)
But when I refresh the page, its working fine. Why I am getting this error?
Thanks
This error occurs when the manifest definition of the assembly file doesn't match the actual reference.
See here for more info:
The located assembly's manifest definition does not match the assembly reference
http://blogs.msdn.com/b/junfeng/archive/2004/03/25/95826.aspx
You could try changing the reference version from Version=3.1.0.0 to Version=3.1.0.1, or another version if you might know it.

Resources