Remove application DLL dependency

In my application, I need to zip and unzip some files. For this, I used the DotNet Zip Library (Ionic.Zip.dll-- DotNet Zip Lib )

Everything works fine, but when I take the EXE from my file and try to run it from another folder, it does not start. I have to keep the Ionic.Zip.dll file in the folder where my application is located. Is there a way out? I just want an exe file without any lines. Or there is another option besides DotNet Zip Lib.

+4
source share
4 answers

When you add a link to another assembly (for example, a third-party DLL) to your C # project, the compiler does not add the contents of this assembly to your EXE; it simply creates a link saying that your program will need to load this DLL when it starts. It is normal to distribute a .NET program as an EXE file and the DLL files that it needs.

But if you prefer, you can combine them into one EXE file. There are several different tools that can combine multiple .NET assemblies into one. See ILMerge or . NETZ .

+12
source

Take a look at these pure C # libraries without external dependencies:

It can be included in your application and compiled directly into your only EXE - no external ZIP archives are required.

+2
source

You can use .net for this, look at the package namespace or if you can use the gzip format, you gave a class . Using this, you remove the dependency on your project.

+1
source

If this is an open source project, you can simply include the source code in your project without adding a link to the "dll".

0
source

All Articles