I have 4 dll开发者_如何学JAVAs. But I want to have 1 single dll which will contain the code from all 4 of these dlls. I tried to add a project and copy paste all of my existing code into one project, but I couldn't.
Have a look into ILMerge
ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly.
You can use ILMerge utility
Or you can embed the dlls you want to merge as resources
Here the code sample:
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
   using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
   {
      Byte[] assemblyData = new Byte[stream.Length];
      stream.Read(assemblyData, 0, assemblyData.Length);
      return Assembly.Load(assemblyData);
   }
};
There is a tool from MS: ILMerge
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论