about mscorlib

Hi
There are 2 mscorlib dlls in our system:
First one is :
C:\WINDOWS\assembly (GAC)
Second one is:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

When .net asembly is executing; which one is loading What is the relationship between them
What are their works(i mean differences;different works)

Any help about why there are 2 dlls and and works will be greatly appreciated.





Answer this question

about mscorlib

  • Chris Breaux

    The one from the GAC will be picked up at runtime (actually the NGENed version from the GAC). Like I mentioned in the previous post, the assemblies in the GAC are used at runtime, the assemblies in the framework directory are used when you compile a new application.

    -Shawn



  • BrammekeDotNet

    OK.

    Thanks.But which one is loading while executing Why are there two dlls for every .net dll (One in GAC and one is in .net framework file)


  • cworkman29729

    C:\windows\assembly is not a physical folder in your system and most of the time, the listed assembly is pointing to a physical file, just like your second one.

    to know which one is being loaded, use the modules window during debug.

    although i'm not sure about your version number v.2.0.50727, it should be a beta version...



  • JRusty

    c:\windows\assembly is a physical folder on your drive, it's just got a special shell extension so it appears differently in explorer. If you go to it with a command shell, you can CD into it and navigate its structure.

    That folder is the GAC, which is where mscorlib will be picked up at runtime. The version in the Framework directory is the version that applications will compile against.

    v2.0.50727 (.42) is the final released version of the v2.0 framework.

    -Shawn



  • about mscorlib