I have a set of .NET components that were developed long ago (1.1). I would like to continue to provide them for 1.1 for any clients that need that version, but also offer versions - in some cases the same code, in some cases with enhancements - for .NET 2 and for .NET 3(.5). In each later case, I might want to take advantages of newer features of the platform for certain components.
I'm looking for guidance as to what the best practice is in this situation.
In the case where I am not looking to make any changes to a component, then I imagine I could still supply it as 1.1 and later libraries/applications could just consume the 1.1 assemblies as is. I suspect there might still be good reasons to provide assemblies built with later versions of .NET - e.g. performance - but my understanding is that I could just supply the 1.1. Is this correct?
In the case where I want to keep the bulk of a component's code working with 1.1, but also add features for later versions of .NET, what's the best approach?
- Separate branches of code
- C# pre-processor
- Supply the functionality in separate (new) classes for the .NET 2+ versions, and use the original via, say, composition
- some other advanced .NET trick I don't yet know about
Also, any advice on what to do with the assembly signing would be greatly appreciated.
Thanks in advance