Best approach for utility class library using Visual Studio

Posted by gregsdennis on Programmers See other posts from Programmers or by gregsdennis
Published on 2012-08-31T12:17:46Z Indexed on 2012/08/31 15:52 UTC
Read the original article Hit count: 366

I have a collection of classes that I commonly (but not always) use when developing WPF applications. The trouble I have is that if I want to use only a subset of the classes, I have three options:

  1. Distribute the entire DLL. While this approach makes code maintenance easier, it does require distributing a large DLL for minimal code functionality.
  2. Copy the classes I need to the current application. This approach solves the problem of not distributing unused code, but completely eliminates code maintenance.
  3. Maintain each class/feature in a separate project. This solves both problems from above, but then I have dramatically increased the number of files that need to be distributed, and it bloats my VS solution with tiny projects.

Ideally, I'd like a combination of 1 & 3: A single project that contains all of my utility classes but builds to a DLL containing only the classes that are used in the current application.

Are there any other common approaches that I haven't considered? Is there any way to do what I want?

Thank you.

© Programmers or respective owner

Related posts about libraries

Related posts about visual-studio