Compiling one C # project to another

I have a C # application that uses some other assemblies, so when I compile, I get files with the extension .exe and 2 or 3.dll. Ideally, I only need a .exe file. I'm currently using ILMerge for this, but since the assemblies I use are Open Source (and under the same license), I wonder if there is an easy way to add them to my solution and compile them into .exe?

What I do not want:

  • Creating a subfolder in my main .exe and copying all other files to it
  • Adding it as a standalone solution, but then add it to my .exe project using Add As Link

I believe that ILMerge more or less accurately does what I want, but if I can apply compiler-level merging, that will be what I want.

Needless to say, referenced assemblies do not have a main () function, so no collisions are expected.

+3
source share
2 answers

As I’ve never tried this, I don’t know if it will work and / or live up to your expectations, but it is possible to compile .net code into a netmodule, and not into an assembly, and then these modules can theoretically be added to other assemblies You can read about it here and.

+1
source

, , , .

, ILMerge - .

+2

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


All Articles