views:

74

answers:

1

We are working on a new library version that contains some UI controls that are used by other applications. Some of these controls have new features that the old applications don't know about. We will disable the new features by default, but there are specific apps for which we'd like to enable them. The apps are likely to exist on the same machine.

How would you recommend implementing this?

Update: The best solution I've come up with is to use Process.GetCurrentProcess() and use something like the proc.MainModule.FileVersionInfo.InternalName to look for a registry key that specifies the override value. Perhaps also looking at a version number to check that it's too old to know about the new features. Are there problems with this method?

Update: The added features are encapsulated within the control, it's just that they make sense in some contexts and not in others.

A: 

I don't think that you can. You are not going to be able to change the interface to the old applications and you will not be able to receive or return any new data. So, the new controls will have to behave to the old applications just like the old controls. Now, if you have behaviors in the new controls that are completely encapsulated within the control (like pinning or minimizing or something like that), those features would likely work on your old applications. You can handle the nuts and bots of getting the old applications to use the new controls assuming they are strongly named and in the GAC using Publisher Policies.

JP Alioto
The features are encapsulated, it's just that they don't always make sense. I updated the question to clarify.
dmo
Also - there are fixes in the new version so we don't want to force loading the old one via Publisher Policies.
dmo