46

I installed the VS2010 and .NET 4.0, then I compiled an assembly and ran the gacutil using the exe available on

%ProgramFiles%\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

The output of the executable said the assembly was sucessfully installed on Global Assembly Cache. However, when I go to %WINDIR%\assembly folder I cannot find the assembly I installed using the .NET Framework 4.0 gacutil.

I've seen some posts saying the .NET Framework 4.0 has a separated GAC, but what I haven't found was where it is located.

May someone to help me to check where can I see the Global Assembly Cache of .NET Framework, as it used to work on previous version (%WINDIR%\assembly)?

Graviton
  • 81,782
  • 146
  • 424
  • 602
CARLOS LOTH
  • 4,675
  • 3
  • 38
  • 44

3 Answers3

47

Yes, there are two distinct GACs as from .NET 4.0

See here: .NET 4.0 has a new GAC, why?

As stated below, the new physical location is %windir%\Microsoft.NET\assembly\ (you can interogate it using the dir command at a command prompt if you're interested).

It's worth noting that applications running up to the 2.0 CLR will not even be able to see assemblies in the new GAC.

Community
  • 1
  • 1
David Neale
  • 16,498
  • 6
  • 59
  • 85
19

Try:

%windir%\Microsoft.NET\assembly\ 
Gonzalo.-
  • 12,512
  • 5
  • 50
  • 82
Jay Riggs
  • 53,046
  • 9
  • 139
  • 151
  • 1
    Do you know if there is an extension to windows explorer to see the details of the assemblies, like public key token, just as the %windir%\assembly does? – CARLOS LOTH May 12 '10 at 22:10
  • @Carlos Loth - Sorry, I don't. – Jay Riggs May 12 '10 at 22:22
  • 6
    Apparently the GAC viewer shell extension (shfusion.dll) has been discontinued for .NET 4.0, and no longer ships with the framework. On a machine with 3.5 and 4.0, I copied the Desktop.ini file from %windir%\assembly to %windir%\Microsoft.NET\assembly (after doing "attrib Desktop.ini -h -r -s" from a command prompt), but this still did not work, even in a new instance of Windows Explorer. – Simon Chadwick May 12 '10 at 23:35
  • How can I install .NET 4.0 assembly in the GAC ? gacutil fails for me... Failure adding assembly to the cache – Kiquenet Dec 14 '11 at 14:09
0

Due to Common Language Runtime (CLR) changes, the contents of the Global Assembly Cache (GAC) is split between two directories:

  • %WINDIR%\assembly\
  • %WINDIR%\Microsoft.NET\assembly\

If you run the command gacutil -l from the directory of your project's .csproj file, you will get a printout of the contents of the GAC (the contents of both directories).

Dean P
  • 1,841
  • 23
  • 23