Could not load file or assembly - asp.net

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.

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?

Could not load file or assembly 'Microsoft.Xrm.Client, Version ERROR

I'm creating an ASP web app that will connect to CRM.
but I got error every time I run my application:
ERROR
Could not load file or assembly 'Microsoft.Xrm.Client
Using the Microsoft.Xrm.Client.dll Version: 5.0.9690.2165 as reference give us an error :
Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9689.2166, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
But when we replace the dll with Microsoft.Xrm.Client.dll Version: 5.0.9689.2166 as reference give us an error:
Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9690.2165, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
And I cant add both version as my Reference.
I'm confused what version on of the Microsoft.Xrm.Client.dll Version to use to debug this Error.
Please let us know if you were able to resolve this, if so what was the reason.
In my case, i had a plugin which was used to create users in MSCRM.
I had two different organizations, Org A and Org B.
As per functionality it was needed that whenever a new user is created in Org A same should be created in Org B
So we registered the plugin on Org A
As the organization B was created using database restore the same plugin was also registered in org B
So, on Creation of user in Org A, plugin of Org A was triggered, which tried to create User in Org B
At the same time as the same plugin was available in Org B it was also triggered.
As per my understanding Org B also tried to load the assembly Microsoft.Xrm.Client.dll which was currently being used by plugin of Org A.
So we were getting the error
Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9689.2166, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Hope this will help somebody!

ASP.NET - How to remove Newtonsoft.Json dependency

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.

"The located assembly's manifest definition does not match the assembly reference" error after installing AjaxControlToolkit via NuGet

The full error:
Parser Error Message: Could not load file or assembly 'AjaxControlToolkit, Version=4.1.7.1005, 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)
This doesn't make sense because the package version I installed was 4.1.7.1213. When I look at the build server logs Nowhere do I see any other version than that.

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.

Resources