Reuse code

Hi,

I’m building a reusable lib to my C# desktop apps. Today, the easy way to use this lib, is at my Visual Studio Solutions, add existing projects.
The problem is that the project added generate his own .dll file, that I have to carry with the application, but since I have the source, I want it compiled inside my exe.

The other solution I found is Add Existing item as link, but it’s hard to maintain cause it can’t add folders.

How you experts reuse code without generating extra dlls



Answer this question

Reuse code

  • Callum

    You only can put it in you exe when you add a existing link item. Otherwise it is allways a DLL, what is wrong with using a DLL


  • CarlosFernando

    Yes that is correct! When that class can be alone and don't use other classes in that DLL it will just compile within you exe.


  • Jacques 316

    I have a lib that generates a 2MB dll file, but I use only one class of this lib. If I compile the source of that class with my app, the exe file will include only that code, isn’t


  • Reuse code