SharpDevelop Community

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

How do I use SharpZipLib under Windows Mobile Compact Framework

Last post 02-26-2007 8:45 PM by DanielGrunwald. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-26-2007 6:30 PM

    How do I use SharpZipLib under Windows Mobile Compact Framework

    I'm trying to use SharpZipLib under Windows Mobile 5.0 which has the Compact Framework v2.0 on it.

     

    First off I couldn't just reference the SharpZipLib in my project because on deploy it would try and deploy all of the full .NET framework DLLs over to the device. So I opened up the SharpZipLib source in SharpDeveloper and changed the Target Framework to Compact Framework 2.0.

    After a successful recompile it now deploys properly to the device but whenever I try to use FastZip I get a Type Load Exception which from what I can gather means that its for the wrong framework. Yet I had recompiled it for the compact framework.

    Opening up the DLL in ILDASM gives me the following from the head of the manifest:

    .assembly extern mscorlib
    {
      .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
      .ver 2:0:0:0
    }
    .assembly extern retargetable System
    {
      .publickeytoken = (96 9D B8 05 3D 33 22 AC )                         // ....=3".
      .ver 2:0:0:0
    }

     

    So the first one, B7...., is incorrect for mobile devices, while the second one, 96...., is the correct PKT for mobile devices. 

     

    What do I have to do to get SharpZipLib to work under the Compact Framework??

     

    Thanks
     

  • 02-26-2007 8:45 PM In reply to

    Re: How do I use SharpZipLib under Windows Mobile Compact Framework

    This is a bug in SharpDevelop's compact framework support which will be fixed for the final SharpDevelop 2.1 release.

    As a workaround, go to the projects compilation options and check "Do not reference mscorlib.dll"; then use Project > Add reference to manually add a reference to mscorlib. Then SharpDevelop will call the C# compiler so that it uses the correct mscorlib version. You will probably see a compilation error for the missing methods, but there should be #ifdef directives in the SharpZipLib source code around all calls to methods that are not supported on the compact framework, so just set the correct compilation symbols.

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