Answer the question
In order to leave comments, you need to log in
How to add dll to final c# assembly?
You need to add a linked third-party library so that it is added to the final assembly, and when you open it, the .exe is no longer needed in the same folder with it. How to achieve this in the studio?
Answer the question
In order to leave comments, you need to log in
You can use Costura.Fody . This library will allow you, when building a project, and if the dependent dlls are managed (written in .NET), at the output you will get a regular exe'shnik, in the resources of which there will be dependent libraries. And if you need to add unmanaged dlls (written in C++/C, etc.) to the assembly, just edit the FodyWeavers.xml file, adding the names of these dlls to special sections. Read more about this in the repository I linked to above, under the heading "Unmanaged32Assemblies & Unmanaged64Assemblies".
You can also use ILMerge . An example of use in this post on Habré. Remember that it only works with managed .NET libraries, not with unmanaged ones.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question