SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

SharpZipLib & ClickOnce

Last post 02-25-2013 12:57 AM by DavidPierson. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-20-2013 5:26 PM

    SharpZipLib & ClickOnce

    I have read about the same problem (bug) in more forums all around the world. This posting from 2007 describes the problem clearly and detailed, I have the totaly same problem:

    http://www.tech-archive.net/pdf/Archive/DotNet/microsoft.public.dotnet.framework/2007-10/msg00486.pdf

    Nobody has answered the question that time. My problem is same. The ClickOnce (or some other program) blocks the SharpZipLib.dll, so the EXE program (originaly written in c#) can not load it into the memory, so the program fails, when it tries to create a zip file. The ClickOnce blocks only one DLL from the many, and this DLL is the SharpZipLib.dll. No other DLL is blocked neither at the original author, nor at me. The error message text and the HResult also same at him and me.

    I copy the original posting from 2007:

    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

     

     

    It is me again. Please find some solution for this problem, it is very urgent.

    Thanx:

    Peter

    Here are log entries from customers (language of the .NET is Hungarian, so part of the message is Hungarian):

    Customer #1:

    System.IO.FileLoadException: Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, 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)
    File name: 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73'

    Customer #2:

    System.IO.FileLoadException: A(z) "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" fájl vagy szerelvény, illetve annak egyik függősége nem tölthető be. A folyamat nem fér hozzá a fájlhoz, mert azt egy másik folyamat használja. (A kivétel HRESULT-értéke: 0x80070020)
    Fájlnév: "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"

    Szerelvényfelügyelő betöltési forrása:  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
    Futtatás a következő végrehajtható fájl hatókörében:  C:\Users\ xxxxx(censored)xxxx.exe
    - Részletes hibanapló következik.

    === Kötés előtti állapot adatai ===
    NAPLÓ: Felhasználó = Bati-THINK\Bati
    NAPLÓ: DisplayName = ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
     (Fully-specified)
    NAPLÓ: AppBase = file:///C:/Users/Bati/AppData/Local/Apps/2.0/QM2O6APV.5R7/NRY9ETHN.XRZ/jobc..tion_c7a30084241735b2_0002.0001_04cb36aa39c1058d/
    NAPLÓ: Kezdeti PrivatePath = NULL
    Szerelvény hívása: TctEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
    ===
    NAPLÓ: Ez a kötés a(z) default betöltési környezetben kezdődik.
    NAPLÓ: Az alkalmazás konfigurációs fájljának használata: C:\Users\Bati\AppData\Local\Apps\2.0\QM2O6APV.5R7\NRY9ETHN.XRZ\jobc..tion_c7a30084241735b2_0002.0001_04cb36aa39c1058d\xxxx(censored)xxxx.exe.config
    NAPLÓ: A(z) C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config számítógép-konfigurációs fájljának használata.
    NAPLÓ: Házirend utáni hivatkozás: ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
    NAPLÓ: Kísérlet az új file:///C:/Users/Bati/AppData/Local/Apps/2.0/QM2O6APV.5R7/NRY9ETHN.XRZ/jobc..tion_c7a30084241735b2_0002.0001_04cb36aa39c1058d/ICSharpCode.SharpZipLib.DLL URL-cím letöltésére.
    HIBA: Nem sikerült befejezni a szerelvény telepítését (hr = 0x80070020). A vizsgálat megszakítva.


    Customer #3:

    System.IO.FileLoadException: A(z) "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" fájl vagy szerelvény, illetve annak egyik függosége nem töltheto be. A folyamat nem fér hozzá a fájlhoz, mert azt egy másik folyamat használja. (A kivétel HRESULT-értéke: 0x80070020)
    Fájlnév: "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"

    Customer #4:

    System.IO.FileLoadException: A(z) "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" fájl vagy szerelvény, illetve annak egyik függősége nem tölthető be. A folyamat nem fér hozzá a fájlhoz, mert azt egy másik folyamat használja. (A kivétel HRESULT-értéke: 0x80070020)
    Fájlnév: "ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"

     

  • 02-21-2013 12:22 AM In reply to

    Re: SharpZipLib & ClickOnce

    Does it fail when you have called the clickonce Update API?

    When you have not?

    What is the relationship between the calling of the Update API and the call that invokes the #ziplib dll?

  • 02-21-2013 10:04 AM In reply to

    Re: SharpZipLib & ClickOnce

    Thank you for your quick response. I am not sure about the background of the situation. But, I can describe the situation. Our application is written in c# .NET. We do not use ASP.NET. Our application is delivered to the customers through ClickOnce. The installed application starts ClickOnce at the start time to check our server for upgrades. It seems, that the trouble happens in this moment, and the ClickOnce starts to block the SharpZipLib.DLL. Later (maybe 30 seconds later) our c# application would like to use the ZIP methods (e.g. ZipOutputStream and ZipInputStream) to send datas of the clients to our server in compressed form. This time (I mean 30 seconds after the start) the .NET reports about the blocked SharpZipLib.DLL which was blocked probably since the starting of the ClickOnce, and the ClickOnce was started at 0 second.

    I hope I explained the situation well, please tell me if the explanation is not clear.

    Have a nice day:

     

    Peter

  • 02-22-2013 2:03 AM In reply to

    Re: SharpZipLib & ClickOnce

    Hi Peter,

    If it were me, I would want to reproduce the problem internally ... and assuming it happens in-house, then as an experiment disable the call to the clickonce upgrade check, and see what happens.

    Also, you are using a very old and unsupported version - please upgrade here.

    Thanks
    David

  • 02-22-2013 9:18 AM In reply to

    Re: SharpZipLib & ClickOnce

    Hi David,

    I use the latest version of the SharpZipLib, and yes, I downloaded from the web site you pointed. The latest version of the SharpZipLib is the 86.0.518, and I am using it, you can check from the log entries I have copied.

    The crash does not happen very often, and not on all the computers, so I was not able to reproduce the error on my computer. But. This error, this bug is existing, this situation is related to the SharpZipLib, so, somebody would have to handle it. Even if I was not able to reproduce the crash, it still exist, you were able to see it from the log entries, and many other people run into this bug. I would like to ask somebody from the developer team, to handle this bug.

    thank you,

    bye,

    Peter

  • 02-25-2013 12:57 AM In reply to

    Re: SharpZipLib & ClickOnce

    Hi Peter,

    Peter Vargay:
    I use the latest version of the SharpZipLib, and yes, I downloaded from the web site you pointed. The latest version of the SharpZipLib is the 86.0.518, and I am using it, you can check from the log entries I have copied.

    This is copied from the log entry in your initial post:

    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)

    The version in that message is 0.85.0.0 which is not the same.

    Perhaps you have a mixture of old and new versions somewhere in the deployment process.?

Page 1 of 1 (6 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.