If a process loads both a .NET 1.1 COM object and a .NET 2.0 COM object, both using an in-process server, what happens? Does anything break with this configuration? Or would it be safer to make one of the objects an out-of-process server?
Asked
Active
Viewed 164 times
1
-
Alternatively, you could upgrade both of them to .NET 3.5 or 4.0. – John Saunders Jun 30 '10 at 19:51
-
Cats and dogs, living together... Mass Hysteria! – Erik Funkenbusch Jun 30 '10 at 20:25
1 Answers
5
It depends which gets loaded first, because (prior to .NET 4) you can only have one version of the runtime loaded into a process. Either the .NET 1.1 object loads first, and the .NET 2.0 object falls over; or the .NET 2.0 object loads first and the .NET 1.1 object hopefully works.
You should probably consider upgrading the .NET 1.1 object to run on 2.0. If you don't, then either your application will fail, or the .NET 1.1 object will get loaded into 2.0 regardless.

Tim Robinson
- 53,480
- 10
- 121
- 138
-
Yeah, I can upgrade _my_ component, but I have no idea what else is in use... I might just go with out-of-process for safety. – bdonlan Jun 30 '10 at 22:24
-
I've run into this issue in the past, with components in COM+. If we called a .NET 2.0 component first, then every new call (.NET 1.1 or .NET 2.0) would work. However, if the .NET 1.1 component was the first, then calls to .NET 2.0 components would fail since the runtime couldn't load these libraries (message "could not find assembly"). – Fabio Feb 14 '11 at 16:54