1

when my .net exe runs, it loads the correct .net assemblies at rumtime. i understand that there is a probing process that happens.

my question is that if i open up the .net exe/dll in ildasm, i only the .extern reference to the mscorlib.dll, not others.

so how does clr gets the information required for doing the probing of the .net referenced assemlies?

i have an example project and the images here.

enter image description here enter image description here

so in this case, i dont see the .net assembly references anywhere like System, System.Xml.Linq, Questions etc.., but obviously they are loaded by the clr and i do see them in my fusion logviewer

where is the data required for .net assemblies located?

i've noticed some inconsistent behaviour behaviour how the extern assemblies are put the manifest for some core .net dlls and other external .net dlls.

Thanks

Tiju John
  • 933
  • 11
  • 28
  • It just isn't the same EXE. Your disasm is for Questions.exe, your trace is for Questions.vshost.exe. Which includes the hosting process and the debugger dependencies. Run Questions.exe outside of VS to compare apples with oranges. – Hans Passant Sep 05 '13 at 13:25
  • i know, i just posted the new pic. – Tiju John Sep 05 '13 at 14:14
  • @John: Hint: if you care enough, you might want to blacken the title bar of ILDASM also. – Christian.K Sep 06 '13 at 06:34

1 Answers1

1

i got it. Actually i got confused a bit. what ILdasm shows is correct. All statically binded dlls are put in the manifest of the dll.

Why we were not seeing system references is because mscorlib has a piece of ‘System’ namespace; Sysem.dll in GAC has the rest of the classes in that namespace. So System namespace is split in two dlls. Most commonly and basis ones are in mscorelibrary.dll and the rest in system.dll

Actually Visual studio is little bit misleading to show System.dll always as a reference, which is not true always

When I used

     var bvv = new System.Uri("http://www.google.com"); ------ System.Uri class is in System.dll

     Console.WriteLine(bvv.AbsolutePath);--------------------- System.Console class is in mscorlib.dll

i could clearly see the reference to System.dll

enter image description here

Tiju John
  • 933
  • 11
  • 28