How does .NET Runtime find nonviolent names?

We have different versions of assemblies with non-strong names and the lack of redirection / sensing bindings to them in app.exe.config. For example, MyDll (1.0.0.0_null_neutral) and MyDll (2.0.0.0_null_neutral). Regarding app.exe, these assemblies are stored in LAC \ MyDll_1.0.0.0_null_neutral and LAC \ MyDll_2.0.0.0_null_neutral.

I understand that because MyDll assemblies do not have a strong name, the .NET runtime does not distinguish between different versions of MyDll. Therefore, if MyDll 1.0.0.0 was already loaded into memory, and some code created against MyDll 2.0.0.0 was executed, the .NET runtime did not load MyDll 2.0.0.0.

However, when I connected to the process using VS2008 and looked at the modules window, I noticed that both MyDll 1.0.0.0 and MyDll 2.0.0.0 were loaded from the LAC folder.

There seems to be a gap in my understanding. Can someone point this out?

EDIT: Thanks for the answers so far. Yes, I missed that bit. The executable listens for the AssemblyResolve event and processes it by looking at the LAC.

I was sure that I had seen some MSDN documentation before the indicated versions were ignored if the assembly was not called strong. I'll see if I can dig it out.

+5
source share
1 answer

http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx

Step 2 checks if it is loaded, and it depends on the version, even with elements that are not very named.

Step 4 attempts to load the assembly through sounding, and this is version independent.

, - , DLL? , :-).

+1

All Articles