zipit FileNotFoundException: Could not load file or assembly -- dependency issue?

Jun 4, 2009 at 7:03 PM

 

When running zipit with no arguments I get this on 4 servers: (Windows Server 2003 x64 R2)

My XP PC and one other x64 server run it ok. I checked the .net framework 2.0 is installed on all the servers I tested. Are there other requirements or pre-reqs I didn't see in the readme or the front page?

"DotNetZip works on PCs with the full .NET Framework"  .. does this mean i need something other than 2.0 x64? Do I need 3.0?

-J

====

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Ionic.Zip, Version=1.7.2.21, Cult
ure=neutral, PublicKeyToken=edbe51ad942a3f5c' or one of its dependencies. The system cannot find the file specified.
File name: 'Ionic.Zip, Version=1.7.2.21, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c'
   at Ionic.Zip.Examples.ZipIt.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Coordinator
Jun 4, 2009 at 9:29 PM

Yes it is a dependency issue.

This problem usually means one of two things:

  • You have not installed the Ionic.Zip.dll, or you have installed it in a separate directory from Zipit.exe
  • you have installed more than one version of DotNetZip.

The Zipit.exe program depends on the Ionic.Zip.dll library.  If you copy over just the Zipit.exe tool to a computer, and try to run it, it will fail with an error like the one you saw.  But more - Zipit.exe will use only a specific version of that library.  If you copy just the Zipit.exe program into a directory that has an older version of Ionic.Zip.dll, the Zipit.exe program will fail with an error like the one you saw.

To avoid the problem, be sure you have installed both zipit.exe and Ionic.Zip.dll - from the same version - into the same directory. And be sure that directory is on your PATH.

 

Jun 4, 2009 at 9:46 PM
Thanks, I copied over the DLL into the path and it's fine. I've been able to do more live log zip testing and no errors, so that's great.

I would suggest possibly bundling the DLL into the EXE's so there's no dependency. Given today's hard drives, size is never an issue, but it is nice to be able to work with a single file, and it will keep others from making the same mistake. Now that I know it's easy enough to copy the files.. so just a thought.

Thanks much

-J

On Thu, Jun 4, 2009 at 4:29 PM, Cheeso <notifications@codeplex.com> wrote:

From: Cheeso

Yes it is a dependency issue.

This problem usually means one of two things:

  • You have not installed the Ionic.Zip.dll, or you have installed it in a separate directory from Zipit.exe
  • you have installed more than one version of DotNetZip.

The Zipit.exe program depends on the Ionic.Zip.dll library.  If you copy over just the Zipit.exe tool to a computer, and try to run it, it will fail with an error like the one you saw.  But more - Zipit.exe will use only a specific version of that library.  If you copy just the Zipit.exe program into a directory that has an older version of Ionic.Zip.dll, the Zipit.exe program will fail with an error like the one you saw.

To avoid the problem, be sure you have installed both zipit.exe and Ionic.Zip.dll - from the same version - into the same directory. And be sure that directory is on your PATH.

 

Read the full discussion online.

To add a post to this discussion, reply to this email (DotNetZip@discussions.codeplex.com)

To start a new discussion for this project, email DotNetZip@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Jun 4, 2009 at 10:13 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.