Where is my gac?

I wanted to get to know the .Net Global Assembly Cache closer. Various Internet sources say that it can be found in Explorer in C: \ WINNT \ Assembly. But I don't seem to have a WINNT folder in C: on my Windows XP machine. I have the "Show hidden files and folders" checkbox selected, and the "Hide protected operating system files" checkbox is not selected.

Using the methods described in How to determine which versions of the .NET Framework and service packs are installed? and especially at http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785 I see that I have .Net 4.0 installed.

How can I reliably find this and why would it be somewhere, but where should it be?

+12
source share
3 answers

As a disclaimer, I will begin by saying that you should never directly edit the contents of your GAC.

To the information ...

There are two different GACs in your question: 2.0 GAC and 4.0 GAC. Speaking of this, they are not so much referring to the version of the .NET framework as to the version of the CLR used. It so happened that in 2.0 the CLR is 2, and in 4.0 the CLR is 4. As a help system, the CLR for .Net 3.5 remained at level 2 and, therefore, the GAC for .net 2.0 and .net 3.5 is the same.

But where is it?

2.0 GAC is located in% WINDIR% \ Assembly in Explorer. For most newer Windows operating systems,% WINDIR% is C: \ Windows by default. Under the hood, this is actually a shell extension that hides the actual location of the GAC, but for your purposes, you open Explorer for C: \ Windows \ Assembly to view the contents of the 2.0 GAC. The shell extension also adds the benefits of dragging and dropping assemblies into C: \ Windows \ Assembly to add them to the GAC (UAC must be disabled in Win7 and later.)

4.0 GAC is located in C: \ Windows \ Microsoft.NET \ assembly. You will find various types of assemblies, divided into their 32-bit, 64-bit, or MSIL subdirectories in this folder. There is no shell extension for CLR4 gac, so you are looking at the actual disk space where the assemblies live.

A little off topic ...

The way that I always programmatically detect which versions of the .NET Framework is installed is to look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP ... subfolders indicate installed versions.

+25
source share

in windows xp, its c: \ windows \ and its hidden folder and you can find it by manually typing in the directory where you are GAC (WINNT was a server or workstation .NT 4.0 or a server running Windows 2000 or Windows 2000), and if it is updated to Windows XP or Windows Server 2003 WINNT, I believe that it will remain intact only in this scenario, that you should use the% windir% global system variable

Im on Windows 8.1 64 bit and gac is still in C: \ Windows \ assembly

but .net is located in c: \ windows \ Microsoft.NET \, where the CLR and runtime are

Oddly enough, to the other answer above, it seems I do not agree that c: \ windows \ assembly is an "old gac"

here are my dos results

 Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>cd.. C:\Windows>cd assembly C:\Windows\assembly>dir Volume in drive C is OS Volume Serial Number is DE26-14AA Directory of C:\Windows\assembly 11/01/2013 01:15 PM <DIR> GAC 11/14/2013 01:10 PM <DIR> GAC_32 11/14/2013 01:10 PM <DIR> GAC_64 11/14/2013 01:27 PM <DIR> GAC_MSIL 11/13/2013 05:36 PM <DIR> NativeImages_v2.0.50727_32 11/10/2013 03:22 AM <DIR> NativeImages_v2.0.50727_64 11/14/2013 01:33 PM <DIR> NativeImages_v4.0.30319_32 11/13/2013 05:36 PM <DIR> NativeImages_v4.0.30319_64 11/14/2013 01:33 PM <DIR> temp 11/14/2013 01:32 PM <DIR> tmp 0 File(s) 0 bytes 10 Dir(s) 27,701,415,936 bytes free C:\Windows\assembly> 

c: \ windows \ microsoft.net \ assembly I don’t think this is your active GAC, I think that is where Visual Studio looks for when it compiles for a specific version of x64 or 32, etc., another c: \ windows \ assembly - the current state of your machine. but I am not an expert, only what I see

+1
source share

C: \ Windows \ Microsoft.NET \ Assembly

C: \ Windows \ Assembly

0
source share

All Articles