How .net 4.0 and .net 2.0 CLR can exist on the same machine

I have a basic doubt that how we can have CLR on one machine. If possible, when I refer to several dll 4.0 and install the application pool on 2.0, why Cant I launch the website (I get errors). When we refer to the dll from web.config, it means that it searches for the GAC when this particular 4.0 dll is available in the GAC. Why it does not load (why it does not load). Please clarify my doubts.

+3
source share
3 answers

Yes, both CLRs can be on the same computer - in fact, .NET 4 allows you to have the same process while supporting both CLRs!

Different assemblies in the GAC will have different versions, so if your links indicate a version, the CLR will download the appropriate one. Of course, you need to make sure that you have the appropriate CLR load of the corresponding assembly; while the v4 CLR can load v2 assemblies (with some restrictions, IIRC), you should not try to download the v4 assembly from CLR v2.

As for the reasons why you are having problems, it is really impossible to say without additional information. (Each time you ask a question and you have a mistake, say what kind of mistake it is.)

+5
source

. , , GAC.

.NET 4 / 2.0.

1,0, 1,1, 2, 3, 3,5 4 .

+3

, 4.0 core dll CLR.dll 2.0 mscorwks.dll

, , lmvm mscorwks 2.0 lmvm clr 4.0

1.1 4.0

http://geekswithblogs.net/sdorman/archive/2008/11/10/clr-4.0-in-process-side-by-side-clr-hosting.aspx

JAS

+1

Source: https://habr.com/ru/post/1741397/


All Articles