Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAC 32bit vs. 64bit

I've been searching for a while trying to understand this better, but am not finding any straight-forward answers on this.

I have a component that I need to add to the GAC. I'm running Windows 7 64-bit, and in an effort to troubleshoot an issue (SSIS 2005 isn't recognizing the DLL), I'm trying to make sure I have the DLL (.NET 4.0) registered in the proper GAC.

So here are my questions:

  1. Where are the physical locations in Windows 7 for both 64bit and 32bit GACs? I know of C:\Windows\assembly, but not sure which one this is, and where the other one is.

  2. Which version of gacutil do I use to add an assembly to 64bit GAC? 32bit GAC? I know of C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC, and I'm assuming this is for 32bit, but not sure where 64bit gacutil is.

  3. What determines which GAC an application looks in for the assembly? I'm assuming this is determined by whether the app is 64bit or 32bit, but am wondering if there is more to it than that.

Thanks in advance.

Update:

After digging into this following ShaneBlake's answer, I remembered that .NET 2.0 and .NET 4.0 GACs are in different locations. So:

.NET 2.0 GAC:
c:\windows\assembly (32bit and 64bit?)

.NET 4.0 GAC
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 (32bit & 64bit?)

like image 378
Jerad Rose Avatar asked Jun 28 '11 14:06

Jerad Rose


People also ask

What is the GAC in Windows?

Each computer where the Common Language Runtime is installed has a machine-wide code cache called the Global Assembly Cache. The Global Assembly Cache stores assemblies specifically designated to be shared by several applications on the computer.

What is GAC code?

GAC Code means the “Global Account Code” number assigned for identification purposes to a portfolio of a Customer of the Company.

What is GAC install?

The global assembly cache (GAC) stores assemblies that several applications share. Install an assembly into the global assembly cache with one of the following components: Windows Installer. Global Assembly Cache tool.

What is GAC application?

The Global Assessment Certificate (GAC) was developed by ACT in conjunction with universities and accrediting bodies around the world to prepare students for university study in English-speaking countries. We accept GAC program credit.


1 Answers

The gacutil.exe should install the .dll to the right location depending on how it was compiled. You should be able to find the file here : %ProgramFiles%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

.NET 4 has it's own Assembly folder (c:\windows\Microsoft.NET\assembly) which has a \GAC_32 and \GAC_64 directories within... This is where you will find your files once they're installed.

Hope that helps...

like image 169
ShaneBlake Avatar answered Sep 25 '22 16:09

ShaneBlake