i faced this question in an interview, Is it possible to have more than one version of CLR in a single machine? pls provide me the details if u know - i mean if its not possible why? otherwise by default which one will be used?. Thanks!
Asked
Active
Viewed 340 times
2 Answers
4
Yes you can install 1.0, 1.1, 2.0 (up to 3.5) and 4.0 in the same machine...
But you can only host one version in each process (not sure if this changed with 4.0)..
Edit: A assembly is compiled against a specific CLR version and that CLR version will be used..

Peter
- 37,042
- 39
- 142
- 198
-
the CLR that ends up hosting it can be slightly different, IIRC – Marc Gravell May 30 '11 at 08:58
-
1Yes. As far as I know, an assembly compiled against *.NET framework* version 2.0 will use *.NET framework* version 2.0 SP1 instead if it is installed. – Daniel Hilgarth May 30 '11 at 09:02
-
BTW: There is not CLR version 3.0 or 3.5: http://stackoverflow.com/questions/212896/how-do-the-net-framework-clr-and-visual-studio-version-numbers-relate-to-each-o – Daniel Hilgarth May 30 '11 at 09:02
-
It is **important** to note that .NET Framework 4.0 is not like the others. It can be used in the same process together with other frameworks. To test, create a new .NET 4.0 project and reference an older CLR version project. No errors, no warnings. – Vercas May 31 '11 at 11:55
2
From MSDN
Starting with the .NET Framework version 4, you can use in-process side-by-side hosting to run multiple versions of the common language runtime (CLR) in a single process.

Mamta D
- 6,310
- 3
- 27
- 41