Question

I'm building a project which consists of two .net executables, and a class library with common components that the two executables share. For ease of distribution, I was hoping to be able to distribute the two executables without distributing the dll (grab & run distribution).

Is there any way to have visual studio compile the contents of the dll into each executable without manually copying the classes into each project (and thereby replicating the code in more than one place)?

Was it helpful?

Solution 2

Digging around on SO I found a duplicate question which stated the problem quite a bit more clearly than I did.

ILMerge seems to be the solution.

Static Linking of libraries created on C# .NET

OTHER TIPS

Don't make it a DLL. Make it a static library instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top