“无法加载文件或程序集”XXX.YYY“或其一个依赖项。系统找不到指定的文件。“ [英] "Could not load file or assembly 'XXX.YYY' or one of its dependencies. The system cannot find the file specified."

查看:136
本文介绍了“无法加载文件或程序集”XXX.YYY“或其一个依赖项。系统找不到指定的文件。“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.net可视化工作室解决方案,包括一些项目(类库和Web应用程序)。



我做了一些折射,它们在项目之间移动文件,创建新项目,删除的项目不被使用并重命名一些现有项目。



解决方案构建没有问题,但是当我运行Web应用程序时,会发生以下异常: / p>

无法加载文件或程序集XXX.YYY或其中的一个依赖项,系统找不到指定的文件。



在折射中删除的XXX.YYY项目输出了一个名为XXX.YYY的dll。但是这个应用程序的任何地方都没有使用。我删除了Web应用程序obj目录和bin文件夹并重建,但仍然发生。



任何人都有任何想法,当这可能发生,任何提示??



更新:



更新我的问题。我把代码放在另一台电脑上,并从那里运行,并建立并运行成功,没有发生此问题。所以这让我认为问题在于我的PC而不是代码库。也许在我的电脑上有一些缓存。我没有删除我的临时文件在C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET文件,但没有运气。



所以可以缓存的任何其他东西或者其他任何原因都会发生在我的电脑上。



进一步更新



另一个更新。我在其他开发者机器上运行过相同的代码,他没有运行它的问题。所以一定是我机器上的东西!我们机器上唯一不同的是,我以经典模式运行IIS7应用程序池。另一位开发人员正在运行IIS6。



2个新的信息。首先在我的web.config中的httpmodules中,我必须删除一个自定义的http模块,然后再添加它。另一个开发人员不必这样做。其次,我已经能够修复无法加载文件或程序集XXX.YYY或其一个依赖关系通过一个黑客问题,这只是一个短期的修复,通过在我的项目中创建一个类库,名为XXX .YYY并包括正在寻找的类,这些都是自定义控件。继承自System.Web.UI.WebControls.WebControl。



任何进一步的想法....

解决方案

解决了这个问题!!!我不得不重新安装.net运行时环境。我也从IIS中删除了网站,并再次重新填写了该网站。当我运行它,这个问题没有发生,站点运行。



非常感谢大家的帮助和帮助,非常感谢。所有的建议和帮助指导我解决这个问题!


I have a .net visual studio solution with a number of projects (class libraries and a web application).

I did some refractoring which moved files between projects, created new projects, deleted ones not being used and renamed some existing projects.

The solution builds without an issue but when I run the web application, the following exception occurs:

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

The project called XXX.YYY which was deleted in the refractoring outputed a dll called XXX.YYY. But this isnt used anywhere in the application. I deleted the web applications obj directory and bin folder and rebuild but it still occurs.

Anyone have any ideas when this might be occurring, any tips??

UPDATE:

Update on my issue. I took the code place to another computer and ran it from there and it built and ran successfully without this issue occurring. So this makes me think the issue is with my PC rather than the code base. Maybe there is something cached on my PC. I did delete my temp files at "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" but no luck.

So anything else that could be cached or any other reason for it to occur on my PC.

FURTHER UPDATE

Another update on this. I have ran the same code on other developers machine and he doesnt have an issue running it. So must definitely be something on my machine! The only different on our machine is that I am running IIS7 with the app's app pool in classic mode. The other developer is running IIS6.

2 new pieces on information. Firstly in my httpmodules in my web.config, I have to remove a custom http module, before adding it. The other developer does not have to do this. Secondly, I have been able to fix the "Could not load file or assembly 'XXX.YYY' or one of its dependencies" issue via a "hack" which is only a short term fix by creating a class library in my project called XXX.YYY and including the classes being looked for, which are all custom controls ie. inheriting from System.Web.UI.WebControls.WebControl.

Any further thoughts....

解决方案

Great news I have solved the issue!!! I had to reinstall my .net runtime environment. I also deleted sites from IIS and readded the website again. When I ran it, the issue did not occur and site ran.

A big thank you to everyone for their help and assistance, very much appreciated. All the advice and help steered me in the direction to solve this!

这篇关于“无法加载文件或程序集”XXX.YYY“或其一个依赖项。系统找不到指定的文件。“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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