简体   繁体   中英

Merge external dlls and class library dll in C#

I have implemented dll using class library c# with externel dlls like Desharp.dll , Newtonsoft.Json.dll , System.Net.Http.Formatting.dll . I want single dll of above all dll merge because when i need use my dll no need to add that externel dlls.

=>below link i have saved my required dlls of releced my class library project c# https://files.fm/u/bccxanhz

In this blogpost three methods to achieve this are described: http://www.manuelmeyer.net/2016/01/net-power-tip-10-merging-assemblies/

They fall into two categories:

  1. Merge all assemblies into one. For this, the tool ILMerge is available.

  2. Include the external assemblies as resources (build action "Embedded Reosurce") in your assembly and handle the AppDomain.AssemblyResolve event to load the requested assembly from the resource (using Assembly.GetManifestResourceStream() ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM