1

I am making a VB.NET installer, using .NET Framework 3.0 and Visual Studio 2012. To unzip files obtained by my installer, I'm making use of ICSharpCode.SharpZipLib.Zip

When the .ZIP file downloads, and attempts to unpack, I am presented with an error stating that the DLL file for SharpZipLib was not found:

C:\Users\Bailey\Documents\Visual Studio 2012\net-20\ICSharpCode.SharpZipLib.dll

However when running in Debug mode on VS2012, it works perfectly fine. What's up?

Anonymous
  • 553
  • 5
  • 17
  • 41
  • The DLL should be in your `Bin\Release` folder. Try copying it there and running the program. – keyboardP Mar 18 '13 at 21:49
  • Alright, I just did that. But what if I want to distribute my .exe? Do I need to ship the DLL with it? – Anonymous Mar 18 '13 at 21:50
  • Yes, if your end user will need to make use of that DLL (which sounds like they will) then you need to ship the DLL with your program. Don't forget to check the license for `SharpZipLib`. – keyboardP Mar 18 '13 at 21:51

1 Answers1

1

The DLL should be in your Bin\Release folder so you'll have to copy it there. If the end user will need to make use of this assembly then you'll also have to distribute the DLL with your program (check the license for SharpZipLib to see what conditions there are).

keyboardP
  • 68,824
  • 13
  • 156
  • 205
  • Just to verify, if I distribute the .exe without the DLL, and then download and move the DLL to the executable's directory while it is running, will it still work? – Anonymous Mar 18 '13 at 21:56
  • Not sure it would work if the program is actually running. If you want to plan for that then your program should be loading the assembly dynamically (e.g. http://stackoverflow.com/questions/1137781/c-sharp-correct-way-to-load-assembly-find-class-and-call-run-method) to be on the safe side. Otherwise there's a good chance your program will throw an error since it expects the assembly to be present when it's first loaded. However, if your end user was to manually add the assembly before starting the program then it should work. Of course, you'd also want to test that works before distributing :) – keyboardP Mar 18 '13 at 22:01
  • Downloading to the working directory was successful. Thanks a ton. – Anonymous Mar 18 '13 at 22:11