Pechkin icon indicating copy to clipboard operation
Pechkin copied to clipboard

Unable to copy ... because it is being used by another process.

Open ckincincy opened this issue 12 years ago • 8 comments

I typically debug using Attach to Process. So the website I am coding on is always running on my machine.

When I build the website for the first time, no issues. However after I do a function that results in Pechkin to be utilized I can't build again.

I get this error on the second build: Unable to copy file ".... wkkthmltox0.dll" to bin\wkhtmltox0.dll". The process cannot access the file '\bin\wkhtmltox0.dll' because it is being used by another process.

I get that same error for all dlls installed via the NUGET package.

The only way I can build the application again is to manually kill the w3wp.exe process.

Any thoughts?

ckincincy avatar Jan 14 '13 20:01 ckincincy

I think, as @Kons said in https://github.com/gmanny/Pechkin/issues/12#issuecomment-11062751

the web server process doesn't shut down and the native libraries aren't unloaded

I'm not familiar with web development with .net, so I can't really propose any fix to it.

gmanny avatar Feb 04 '13 17:02 gmanny

Just right click the DLL's in the solution explorer and select Properties. By default, Copy To Output Directory is set to 'Copy Always'. Change this to 'Copy If Newer' and you're fine.

stirrblig avatar Feb 22 '13 07:02 stirrblig

Thanks stirrblig, that worked for me in visual studio 2012

mattki avatar Mar 07 '13 02:03 mattki

Not working for me ( VS 2010 / Development Server )

humanbeinc avatar Apr 18 '13 17:04 humanbeinc

Then you did something not quite right as that completely prevents the error. Not possible to reproduce if you don't copy the dll.

ckincincy avatar Apr 18 '13 17:04 ckincincy

Sry, wrong thread. Wanted to post to the "hanging" in iis thread..

humanbeinc avatar Apr 18 '13 17:04 humanbeinc

if you have used nuget package to download simple cut paste to folder it will be their permanently(in VS 2010)

aloksharma1 avatar May 05 '13 11:05 aloksharma1

This problem should be resolved in my pull request here: https://github.com/gmanny/Pechkin/pull/42

tuespetre avatar Aug 02 '13 15:08 tuespetre