Question

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?

Was it helpful?

Solution

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. (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. (If running on IIS, try restarting the website.)

If you start having issues with whatever part of your code uses the Zip functionality, then you will need to investigate further.

OTHER TIPS

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. When does this occur? Please provide more details. Close out visual studio (if its running). If its a web app, restart IIS and try doing whatever unknown action you were doing again.

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. But whenever you will run this application any another system on which Visual Studio not installed, on that machine it couldn't runs properly....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top