我的 ASP.NET 应用程序中出现程序集加载错误,并且该程序集甚至不再被引用
我有一些引用 Noesis.Javascript 程序集 (http://javascriptdotnet.codeplex.com) 的代码,并将 Noesis.Javascript.dll 重命名为 Noesis.Javascript.0.4.dll。我通过 Visual Studio 引用了此文件,当我在 ASP.NET 开发服务器中启动 Web 应用程序时,出现此错误:
无法加载文件或程序集 “Noesis.Javascript.0.4”或其之一 依赖关系。所在的程序集 清单定义不匹配 装配参考。 (例外情况来自 HRESULT:0x80131040)
然后我尝试删除此引用并重新引用旧版本的库。我遇到了同样的错误。然后,我尝试完全删除此引用并注释掉使用此库的所有代码。我仍然遇到同样的错误。我尝试从系统托盘中的图标显式关闭 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
进入注册表并将 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 设置为 1。
刷新页面,错误输出将显示哪个程序集依赖于 Noesis.Javascript.0.4。
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.
检查“Noesis.Javascript.0.4”是否出现在 web.config 文件中的任何位置,如果出现则将其删除。它可能位于
部分。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.删除引用并再次添加。请注意,两个dll版本必须相同。如果它已注册到您的 web.config 中,请勿添加任何更高版本,否则您也需要从那里删除。
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.
就我而言,我添加了错误的 DLL。我没有添加 64 位,而是添加了 32 位。
谢谢,
In my case, I added a wrong DLL. Instead of adding 64bit, I added 32bit.
Thanks,