简体   繁体   English

广汽 32 位与 64 位

[英]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.我有一个需要添加到 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.我正在运行 Windows 7 64 位,并且为了解决问题(SSIS 2005 无法识别 DLL),我试图确保我在正确的 GAC 中注册了 DLL (.NET 4.0) .

So here are my questions:所以这是我的问题:

  1. Where are the physical locations in Windows 7 for both 64bit and 32bit GACs?对于 64 位和 32 位 GAC,Windows 7 中的物理位置在哪里? I know of C:\Windows\assembly, but not sure which one this is, and where the other one is.我知道 C:\Windows\assembly,但不确定这是哪一个,另一个在哪里。

  2. Which version of gacutil do I use to add an assembly to 64bit GAC?我使用哪个版本的 gacutil 将程序集添加到 64 位 GAC? 32bit GAC? 32位广汽? 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.我知道 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC,我假设这是 32 位的,但不确定 64 位 gacutil 在哪里。

  3. What determines which GAC an application looks in for the assembly?什么决定了应用程序在哪个 GAC 中查找程序集? 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.我假设这取决于应用程序是 64 位还是 32 位,但我想知道是否还有更多。

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.在深入了解 ShaneBlake 的回答之后,我记得 .NET 2.0 和 .NET 4.0 GAC 位于不同的位置。 So:所以:

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

.NET 4.0 GAC .NET 4.0 广汽
c:\windows\Microsoft.NET\assembly\GAC_32 (32bit only) c:\windows\Microsoft.NET\assembly\GAC_32 (仅限 32 位)
c:\windows\Microsoft.NET\assembly\GAC_64 (64bit only) c:\windows\Microsoft.NET\assembly\GAC_64 (仅限 64 位)
c:\windows\Microsoft.NET\assembly\GAC_MSIL (32bit & 64bit?) c:\windows\Microsoft.NET\assembly\GAC_MSIL (32 位和 64 位?)

The gacutil.exe should install the.dll to the right location depending on how it was compiled. gacutil.exe 应根据编译方式将.dll 安装到正确的位置。 You should be able to find the file here: %ProgramFiles%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\您应该可以在此处找到该文件: %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. .NET 4 有它自己的 Assembly 文件夹( c:\windows\Microsoft.NET\assembly ),其中有一个\GAC_32\GAC_64目录......这是安装后您可以找到文件的地方。

Hope that helps...希望有帮助...

For Windows 10 :对于Windows 10

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM