I’m currently working on a few old apps written in a variety COM compliant languages, but which have a plugin architecture which only supports .NET2 plugins. We’ve tried to upgrade to .NET4 and failed, so for now we’re stuck with .NET2 as the CLR runtime in our app.
We now need to access some rather complex web services, for which we’d like to use WCF. Option number one is to use a COM wrapper and call the .NET4 libraries from native code, but we lose the use of our plugin mechanism. I’d like to know if there is a way to run .net 2 & 4 components in the same process, or some other way I could possibly solve this?
A slight change to @Kennet’s approach is to just change the config file so that the app runs in .Net 4 without recompiling.
Here’s an article I found on this subject: Running .NET 2 Runtime applications under the .NET 4 Runtime
Here’s the important bits from the article (I have not tried this myself)…