Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
340 views
in Technique[技术] by (71.8m points)

c# - 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:Windowsassembly, 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.0VC, 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:windowsassembly (32bit and 64bit?)

.NET 4.0 GAC
c:windowsMicrosoft.NETassemblyGAC_32 (32bit only)
c:windowsMicrosoft.NETassemblyGAC_64 (64bit only)
c:windowsMicrosoft.NETassemblyGAC_MSIL (32bit & 64bit?)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 SDKsWindowsv7.0AinNETFX 4.0 Tools

.NET 4 has it's own Assembly folder (c:windowsMicrosoft.NETassembly) 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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...