无法加载文件或程序集"app_code"或其依赖项之一 [英] Could not load file or assembly 'app_code' or one of its dependencies

查看:132
本文介绍了无法加载文件或程序集"app_code"或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这已经困扰了我一段时间了:

This has been bothering me for a while now:

Could not load file or assembly 'app_code' or one of its dependencies. 
The system cannot find the file specified.

我正在使用Visual Studio 2008和IIS6,由于某种原因,我遇到了这个奇怪的错误.

I'm using visual studio 2008 and IIS6 and for some reason I get this weird error.

为什么要尝试加载"app_code",为什么会失败?

Why is it trying to load 'app_code', and why does it fail?

试图解决该问题/使用异常中的信息查找更多信息

Tried to resolve it/ find out more using the information in the exception

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

但这没有帮助,msdn文章中有关程序集绑定日志查看器的信息也没有帮助:(

But that didn't help, neither did the information in the msdn article about the Assembly Binding Log Viewer: (http://msdn.microsoft.com/en-us/library/e74a18c4.aspx)

任何人都可以照耀这种可憎之处吗?我猜这是一个新手错误,但我不知道现在要看哪里.可能是IIS 6.0配置问题吗?我正在使用Windows XP Professional Edition和Visual Studio 2008.

Anyone can shine a light on this abomination? I'm guessing this is a newbie mistake but I have no idea where to look now. Could it be IIS 6.0 configuration issue? I am using Windows XP Professional Edition and Visual Studio 2008.

启动Assembly绑定监视器之后,它会弹出类似以下内容的

After getting the Assembly binding monitor up, it spews out something like:

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Projects\NNNNNN\src\Trunc\Web\web.config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.Web, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/d94fb3b9/d76068ec/Microsoft.VisualStudio.Web.DLL.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/d94fb3b9/d76068ec/Microsoft.VisualStudio.Web/Microsoft.VisualStudio.Web.DLL.
LOG: Attempting download of new URL file:///C:/Projects/NNNNNN/src/Trunc/Web/bin/Microsoft.VisualStudio.Web.DLL.
LOG: Attempting download of new URL file:///C:/Projects/NNNNNN/src/Trunc/Web/bin/Microsoft.VisualStudio.Web/Microsoft.VisualStudio.Web.DLL.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/d94fb3b9/d76068ec/Microsoft.VisualStudio.Web.EXE.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/d94fb3b9/d76068ec/Microsoft.VisualStudio.Web/Microsoft.VisualStudio.Web.EXE.
LOG: Attempting download of new URL file:///C:/Projects/NNNNNN/src/Trunc/Web/bin/Microsoft.VisualStudio.Web.EXE.
LOG: Attempting download of new URL file:///C:/Projects/NNNNNN/src/Trunc/Web/bin/Microsoft.VisualStudio.Web/Microsoft.VisualStudio.Web.EXE.
LOG: All probing URLs attempted and failed.

推荐答案

此错误是由于web.config引用了错误的类包所致.周末清理头脑,轻松解决问题.

This error was due to web.config was referencing the wrong package for a class. Clearing the mind over the weekend, and problems are solved easily.

这篇关于无法加载文件或程序集"app_code"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆