C # How to build a dll from network modules

In my project, I want to reuse code for multiple binaries (.exe).

So, I decided to create a .dll from some sources and include it in my .exe application thanks to csc.exe.

OK, that works.

But now I want to add a new level: I would like to build some clean modules, and then build my .dll, which includes all the network modules created earlier.

Is it possible? How?

+4
source share
3 answers

It is possible. If you compile your projects as .netmodules, you can link them to one separate assembly. Instructions can be found here .

+1
source

I think you will end up with several file assemblies if you use the C # compiler for this.

But link.exe (which comes with Visual C ++) should be able to create a single file assembly from multiple .netmodule files.

+3
source
 /*for one file */ csc /target:module misource1.cs /*for multiple file */ csc /target:module misource1.cs misource2.cs misource3.cs 

Target is a module, so save it before the source file names

0
source

Source: https://habr.com/ru/post/1342327/


All Articles