.net - How to remove unused methods in C#? -


this question has answer here:

for example, have 2 projects sharing functions, let's them , b. create library project c, containing public code. put common code in class, in class, not methods used in both projects. of them used in a, used in b , rest used in both of them.

now, after compiling, got a.exe, b.exe , c.dll. want is:

  1. i don't want dll, want a.exe , b.exe

  2. i don't want methods used in a.exe appears in b.exe, , vice versa.

merging dll , exe can solve problem 1, how 2?

what describing static library, not dll.

if c static library, when compile (with compiler set drop unused stuff), a's exe have code required taken static library c , put directly exe. same go b.

but that's not how dlls work.

with dll, getting "services" of code c, since code lives in c, has no control on code in c.

as @robertmoskal points out, there answers out there tools want. wanted clarify intent counter design of dlls although can done tools mentioned elsewhere.


Popular posts from this blog