Search code examples
c#dotnetzip

System.IO.FileNotFoundException Reference not found on when run on users computer


I am making a program in C# with Visual Studio Express 2013. I am using Ionic.zip (dotnetzip). When i run it from the .../bin/release directory or from Visual studio, it runs perfectly fine. when the end user has it on their computers, or I run it from another location, when it tries to perform an action using ionic.zip, it crashes with the following exception

System.IO.FileNotFoundException: Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c' or one of its dependencies. The system cannot find the file specified.
File name: 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c'

I have absolutely no idea how to fix this, and have been researching for the last 3 days how to with no success. Any help will be appreciated.

Thanks, James


Solution

  • You need to have an installer or script copy the DLL to the executing directory(where the executable is) or into the computers PATH.