简体   繁体   English

Visual Studio 2010无法加载引用的DLL

[英]Visual Studio 2010 Wont Load Referenced DLLs

I have been working on an ASP.NET project for months now without issue. 我已经从事ASP.NET项目几个月了,没有任何问题。 Recently my computer crashed mid compile and now when I load and run the project I get 'Could not load file or assembly 'Ionic.Zip' or one of its dependencies.' 最近,我的计算机在编译过程中崩溃,现在当我加载并运行项目时,我得到“无法加载文件或程序集“ Ionic.Zip”或其依赖项之一”。

Thinking it was an issue with that particular DLL, I removed it as a test only to have the project say it could not load another referenced DLL, etc etc, until I had no references left... 认为这是特定DLL的问题,所以我删除了它作为测试,只是让项目说它无法加载另一个引用的DLL等,直到没有引用了...

Any ideas? 有任何想法吗?

If nothing in the code has changed. 如果代码中没有任何更改。 "Build->Rebuild Solution" should do the trick (implicitly cleans and builds). “ Build-> Rebuild Solution”应该可以解决问题(隐式清理和构建)。

If this does not work, do "Build->Clean solution" and go delete all generated build folders (default bin and obj folders). 如果这不起作用,请执行“构建->清洁解决方案”,然后删除所有生成的构建文件夹(默认bin和obj文件夹)。 And then try build and run. 然后尝试构建并运行。

And if it still does not work, the code has changed and dependencies are really missing. 如果仍然无法使用,则说明代码已更改,并且确实缺少依赖项。 Using NuGet and packages are missing perhaps? 使用NuGet和包可能丢失了吗?

I tried everything but NuGet, I didn't use it to get any of the references before. 除了NuGet以外,我都尝试了所有方法,之前我没有使用它来获取任何参考。

In the end I had to check in all my changes to TFS, delete the project from my workspace and computer, and then reload it from TFS. 最后,我必须检入对TFS的所有更改,从工作区和计算机中删除该项目,然后从TFS重新加载它。 Seems to have worked. 似乎奏效了。 Something must have been damaged in the project file. 项目文件中一定有损坏的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM