We have an app which optionally integrates with TFS, however as the integration is optional I obviously dont want to have all machine need the TFS assemblies as a requirement.
What should I do?
- Is it ok for me to reference the TFS libraries in my main assemblies and just make sure that I only reference TFS related objects when I'm using TFS integration.
- Alternatively the safer option would be to reference the TFS libraries in some separate "TFSWrapper" assembly:
- Is it then ok for me to reference that assembly directly (again as long as I'm careful about whatI call)
- Should I instead be exposing a set of interfaces for my TFSWrapper assembly to implement, and then instantiate those objects using reflection when require.
1 seems risky to me, on the flip side 2b. seems over-the-top - I would essentially be building a plug-in system.
Surely there must be a simpler way?