April 15, 2013

Multiple GAC .net Framework 4.0

After installing the .net framework you will see multiple GAC folders. or sometime you try to fine the assembly in GAC its not there. because 4.0 Gac is installed at different location.

Why there are multiple GAC.

Because till 2.0, microsoft was uniquenly identifying assembly by 4 dimensions

1) Name
2) Version
3) Public key
4) Culture

in 4.0 they facing some issues keeping 4.0 assemblies in the same 2.0 GAC.

Path for Gacutil.exe
for Framework 2.0 assembly
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin

For Framewokr 3.5 assembly
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

For Framework 4.0 assembly
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

GAC (Global assembly Cache) Path:

for .NET framework  2.0 & 3.5 :
c:\windows\assembly (32bit, 64bit, MSIL)

.NET 4.0 GAC
in 4.0 assembly go into its different folder depending on its compilation
c:\windows\Microsoft.NET\assembly\GAC_32 (32bit only)
c:\windows\Microsoft.NET\assembly\GAC_64 (64bit only)
c:\windows\Microsoft.NET\assembly\GAC_MSIL (any CPU)
also 4.0 does not have GAC Viewer. 

No comments: