简体   繁体   English

asp.net中的错误,但应用程序运行平稳

[英]Error in asp.net but application run smoothly

I got a error: 我收到一个错误:

Error   1 Cannot copy assembly 'ICSharpCode.SharpZipLib.dll' to file 'FileLocation\bin\ICSharpCode.SharpZipLib.dll'.  
Unable to add 'FileLocation\bin\ICSharpCode.SharpZipLib.dll' to the Web site.  
Unable to add file 'bin\ICSharpCode.SharpZipLib.dll'.  
The process cannot access the file because it is being used by another process.

Any idea about this? 有什么想法吗?

Sounds like your app was recompiling and tried to copy the zip lib, which was already in use because of a bad ref in visual studio or a running program. 听起来好像您的应用正在重新编译,并试图复制zip库,该库已被使用,原因是Visual Studio中的引用错误或正在运行的程序。 When does this occur? 什么时候发生? Please provide more details. 请提供更多详细信息。 Close out visual studio (if its running). 关闭Visual Studio(如果正在运行)。 If its a web app, restart IIS and try doing whatever unknown action you were doing again. 如果它是Web应用程序,请重新启动IIS,然后尝试再次执行未知操作。

This is an error you can get when you have a file that's still locked by a process; 当您的文件仍被进程锁定时,会出现此错误; it sounds like the file was still open by something when you went to build,so it couldn't copy it to the website. 听起来好像文件在构建时仍被某些东西打开,所以无法将其复制到网站。

As long as you aren't directly modifying the ICSharpCode.SharpZipLib source code, and since it's reporting it to already be in the location you need, it's possible that the development or IIS server just still had the file open, in which case it wouldn't be a big deal. 只要您不直接修改ICSharpCode.SharpZipLib源代码,并且由于它报告它已经位于所需的位置,则开发或IIS服务器可能仍打开了文件,在这种情况下,没什么大不了的。 (Did you close all browsers?) If that's the case, and your application is running fine, then it's probably not a huge deal, although I would probably close down the development server, and Visual Studio, then reopen and try again. (是否关闭了所有浏览器?)如果是这种情况,并且您的应用程序运行良好,那么虽然我可能会关闭开发服务器和Visual Studio,然后重新打开并重试,但这可能不是什么大问题。 (If running on IIS, try restarting the website.) (如果在IIS上运行,请尝试重新启动网站。)

If you start having issues with whatever part of your code uses the Zip functionality, then you will need to investigate further. 如果您开始对使用Zip功能的代码的任何部分产生疑问,则需要进一步调查。

Application tried to copied ICSharpCode.SharpZipLib.dll file from GAC or Visual Studio Assembly folder into your application's bin folder but it can't copied and application runs successfully on your system because your application put this dll file from GAC. 应用程序尝试将ICSharpCode.SharpZipLib.dll文件从GAC或Visual Studio Assembly文件夹复制到应用程序的bin文件夹中,但无法复制,并且应用程序在系统上成功运行,因为您的应用程序将这个dll文件从GAC放入了。 But whenever you will run this application any another system on which Visual Studio not installed, on that machine it couldn't runs properly.... 但是,无论何时只要运行此应用程序,任何未在其上安装Visual Studio的其他系统都无法在该计算机上正常运行。

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

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