Assembly loading error in my ASP.NET app, and the assembly isn't even referenced anymore - asp.net

I had some code that referenced the Noesis.Javascript assembly (http://javascriptdotnet.codeplex.com) and had renamed the Noesis.Javascript.dll to Noesis.Javascript.0.4.dll. I referenced this file through Visual Studio, and when I launched my web app in the ASP.NET development server, I got this error:
Could not load file or assembly
'Noesis.Javascript.0.4' or one of its
dependencies. The located assembly's
manifest definition does not match the
assembly reference. (Exception from
HRESULT: 0x80131040)
I then tried to remove this reference and re-reference the older version of the library. I got the same error. I then tried to remove this reference entirely and comment out all code that used this library. I still get the same error. I have tried to explicitly close out the ASP.NET development server from its icon in the system tray, but this still occurs. I can find no reference of this assembly anywhere in my project now, yet the error persists. What might be happening? Is there some cache that I'm not finding? How can I resolve this error?

Go into the registry and set [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Refresh the page and the error output will show you which assembly has a dependency on Noesis.Javascript.0.4.

Check if "Noesis.Javascript.0.4" appears anywhere in your web.config file and remove it if it does. It might be in the <assemblies> part.

remove the reference and add it again. Please note that the two dll version must be same. Do not add any later version, if its get registered into your web.config, otherwise you need to remove from there too.

In my case, I added a wrong DLL. Instead of adding 64bit, I added 32bit.
Thanks,

Related

web.config comments included in line error?

I'm troubleshooting an app, and I have this error to work with:
Exception message: Could not load file or assembly 'This.File,
Version=1, Culture=neutral, PublicKeyToken=[sometoken]' or one of its
dependencies. Access is denied. (C:\Program Files[file
location]\web.config line 205
Now - is that exactly line 205 of the web.config file, or is that line 205 if all the comments and empty lines from the web.config are removed?
I've tried researching this but find it very tricky!
Thank you!
This error means that there is an assembly referenced in the web.config that the compiler cannot locate. There are tactics to troubleshoot this. First, if you have the DLL make sure it is referenced by your project.
If it is a library located some where on your test machine, you can use this tool from the .NET Framework SDK - Assembly Binding Log Viewer https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx. This tool will tell you where .NET is looking when its trying to find your assembly.
If you want to load the assembly dynamically at run time, you can catch this error in code by handling the AssemblyResolve event on the current AppDomain: https://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.110).aspx

Unable to Initialize TDSE object. Could not load file or assembly 'Tridion.ContentManager.Publishing while accessing the Tridion UI

While opening the Tridion UI I am getting this error:
Unable to Initialize TDSE object. Could not load file or assembly 'Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) The type initializer for 'Tridion.ContentManager.TypeRegistry' threw an exception.
Most probably you have some extension or something like this that you have copied from the network and your DLL get locked. You need to find this DLL and click Unblock from the context menu. You will most probably have to do it for all other copied dlls as well. It should look like this:
http://www.izenda.com/Site/KB/Uploads/Images/unblock.PNG
In case you have no idea where to look - use procmon
I would also double check Tridion.ContentManager.Publishing dll is in the GAC.
A quick way to see this is to look in c:\windows\assembly and match the version of the DLL as well. You could re-drag and drop the DLL there to make sure all is well.

Could not load file or assembly when trying to remove/delete Resource/Application

I have a Biztalk application that is basically a housing for a schema that other applications are using. I now want to remove this application, but am unable to from the BizTalk Server Admin Console, when I right-click --> Remove I get an error that says
Could not load file or assembly <assembly_name>.dll or one of its dependencies. The system cannot find the path specified (mscorlib)
followed by:
The system cannot find the path specified (Exception from HRESULT: 0x80070003)
So I go to remove the assembly from the Application and get the exact same error. I remove all references to it in other biztalk resources and still the same error when trying to delete the application or resource. I did notice that in the Modify Resouces dialog of referencing assemblies, this rogue assembly is listed as a dependency status of Not Found.
The strange thing is, when Messages come through, the resources which depend on the rogue assembly, still work fine and no errors are thrown (despite them using components of the assembly which shows as Not Found).
I have made sure to check the GAC and the assembly is loaded to it.
So now I have to ask:
where is Biztalk actually looking for this assembly?
is there a way I can just force a deletion of this application?
why does it care if the assembly is not found, when I'm trying to delete it?
why does it show as Not Found, yet still work?
Thanks.
I think the key is "or one of its dependencies." If it's a dependency it may be using the standard windows mechanism for finding a dll. It searches the current directory and the windows directory for them.
"where is Biztalk actually looking for this assembly?"
Look in the 'resources' section of your application in the biztalk management console. It shows a column with the location of the assembly.
I'd stop all the host instances/orchestrations, and then unload all your stuff from the GAC - if messages are actually still going through then stuff is still loaded that is using your schema.

How to update dll in asp.net

I update my freetextbox version into 3.3.0.22838. I don't know how to update it. i just copy paste my new version in bin.
And I get this error:
Could not load file or assembly 'FreeTextBox, Version=3.1.5.21298, Culture=neutral, PublicKeyToken=5962a4e684a48b87' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Line 1: <%# page language="C#" masterpagefile="~/Template/BackendTemplate.master" autoeventwireup="true" validaterequest="false" inherits="Backend_Modules_BookManagement, App_Web_wplihlju" title="Untitled Page" %>
Much thanks!
Double check your solution's reference to the assembly. Right-click > Properties > Specific Version should be set to False. That or drop the reference to the old one and add a reference to the new one. Either way you'll need to recompile. The first suggestion will solve it for all future versions however.
hallo it says on error that you used different version of control on build you should put version Version=3.1.5.21298 instead of version 3.3.0.22838...
or you should build your project with version 3.3.0.22838 and deploy all your project....
As you see in the error message FreeTextBox has a public key token and also a version number. when you add a dll as a reference to your application, it binds your application to this publick token key and version number.
so you need to remove your FreeTextBox dll from your application references and add reference to new version to correct your problem.
just open your solution, go to references of your application, remove the FreeTextBox reference. then right click on references and select add reference and then select your new FreeTextBox dll. after rebuild, every thing will go fine.
The loader cannot find the assembly that was referenced; see that you put your assembly in the application folder or GAC it.

Could not load file or assembly after upgrading DevExpress

I've been tearing my hair out over this one, and hopefully it'll be something simple that I'm too thick to work out for myself.
We've got a ASP.NET website (IIS7.5, Server 2008R2) that uses the wonderful DevExpress ASP modules. All was working fine until I had the bright idea of upgrading the modules from 10.1.4 to 10.1.7. Ever since, the site throws intermittent but regular errors that it:
Could not load file or assembly 'DevExpress.Data.v10.1, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
All the .aspx files have similar register tags, e.g.:
<%# Register assembly="DevExpress.Web.ASPxEditors.v10.1" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
I updated the VS2010 project using DevExpress's own upgrader utility. There is no reference to v10.1.4 anywhere in the code - I've checked the .aspx files, web.config etc - and the web server has all the latest .DLL's on too. I've even moved the site to a complete new, virgin server, yet the error still occurs. Specifying the subversion number and public key in the register tag doesn't make any different.
I've iisreset'd, cleared out temporary files, rebooted etc, all to no avail. The really frustrating thing is the error isn't reproducible - sometimes it happens, sometimes it doesn't. Can anyone help me out?
In the solutionExplorer: switched to the File View and changed
CopyLocal = true
for all DevExpress assemblies both in the Server and ServerGenerated projects.
It resolves the issue for me.
Could you please try it and let me know if that helps?
Please make certain that the application's bin folder does not contain our old assemblies. Also, search your project for '10.1.4.0' substring and make sure that this string does not appear. If this does not help, you must be sure that your application does not reference a dll which references our old assemblies or which is residing in the bin folder. Finally, a good idea is to clear the Temporary ASP.NET Files Folder ("C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files")... I hope, this will be helpful.

Resources