Can an app dynamically detect what version of .NET is available and load the appropriate version of an assembly? Here's the scenario:
We can only rely on FX2.0 being available on our customer's computer. For this reason our app (a Windows Forms based desktop app) is written using FX2.0 even though it could also run under FX4.0. The app uses a third party assembly. The third party
has now released a new version that requires FX4.0 and calls methods that are only available in FX4.0.
What we want to do is use the FX2.0 version of the third-party assembly if .NET 4.0 is not installed, and use the FX4.0 version of the third-party assembly if .NET 4.0 is installed.
What is the best strategy to do this?
View Complete Post