ClickOnce Application unable to load dll, locked by other process

A

Andrew Purnis

Hi.

I am getting an unusual problem from my ClickOnce deployed application. It
is self updating using the APIs not using the auto update settings.
Once in a while the application will throw this exception, but starting it
again it works fine. The SharpZipLib is deployed with the ClickOnce
application but is not required when the application starts but later in the
application. It is the first dll that is loaded later and always the one to
throw this exception. I was wondering if anyone knows how ClickOnce
updates, is it possible this dll has been locked and moved to the next
version directory as part of the update before I try to load it? I am not
sure this is even an Update problem but I have only seen it in the ClickOnce
deployment. It is definitely timing related as it does not happen very
often.

Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.85.0.0,
Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its
dependencies. The process cannot access the file because it is being used by
another process. (Exception from HRESULT: 0x80070020)

Any ideas would be greatly appreciated I have been working on this for a
while with no success and am completely out of ideas.

Thanks.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top