我应该用什么的Gacutil.exe? [英] What gacutil.exe should I use?

查看:426
本文介绍了我应该用什么的Gacutil.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此​​,在赢2008 R2标准版x64,我有6小的Gacutil.exe各不相同(不包括那些在VS的文件夹)中:

  1. <打击> C:\ Program Files文件\微软的SDK \的Windows \ v6.0A \ BIN
  2. <打击> C:\ Program Files文件\微软的SDK \的Windows \ v6.0A \ BIN \ 64
  3. <打击> C:\ Program Files文件(x86)的\微软的SDK \的Windows \ v7.0A \ BIN
  4. <打击> C:\ Program Files文件(x86)的\微软的SDK \的Windows \ v7.0A \ BIN \ 64
  5. C:\ Program Files文件(x86)的\微软的SDK \的Windows \ v7.0A \ BIN \ NETFX 4.0工具
  6. <打击> C:\ Program Files文件(x86)的\微软的SDK \的Windows \ v7.0A \ BIN \ NETFX 4.0工具\ 64

问题是:

  1. 确实 64 版本有任何行为上的差异?
  2. 我应该preFER v7.0A 版本的其他 v6.0A
  3. 我应该使用 NETFX 4.0工具版本.NET 4.0组件,而标准版的休息吗?

或者,如果有一些关于这个问题的一般类型的文章中,我将非常感激。

更新1 关于汉斯帕桑特的回答

  1. 的Gacutil.exe 是一个.NET框架工具的一部分的构建,部署和配置工具(.NET框架)为现在已经过时(!) shfusion。 DLL 是;
  2. 事实上v6.0A来自VS2008安装,并且可以被忽略(1,2);
  3. 在64位的解释理论听起来也合理。我也想有最有可能的 IA64版本的Gacutil.exe 的,所以它的像工具复制每个平台,它只是happend使x86版本,因为了WoW64到处运行正常。减去从列表2 GACUTIL版本(4,6);
  4. 有关要使用哪个版本的一部分,似乎是错误的。 V4.0的Gacutil.exe检测和地方根据它装配的目标CLR,并为.NET 4.0和更早版本的组件工作正常。所以现在的问题是,为什么要离开V2.0的Gacutil.exe?我的猜测是对部署在那里.NET4.0不可用环境的目的。
  5. 要使用或不使用GAC,是不是这个问题。所以,我离开最后一段没有评论。

更新2。

所以,对我来说好像可以放心地使用任何数字3(当时.NET4.0不可用)或5号以其他方式在Windows x86和x64所有GAC操作。而问题的答案是:

  1. 无。
  2. 没关系,但使用新版本似乎更符合逻辑。
  3. 没有,你可以随时使用 NETFX 4.0工具版本(如果.NET4.0可用)的所有GAC操作。
解决方案

短版:如果你有.NET 4.0安装,使用 NETFX 4.0工具版本。否则,它其实并不重要。

问题的答案:

  1. 无。
  2. 其实并不重要,除非没有.NET 4.0安装,在这种情况下,你应该使用 NETFX 4.0工具版本。不知道是否有可能有一个V7.0 SDK和没有.NET 4.0安装。
  3. 不,你随时可以(也应该)使用 NETFX 4.0工具版本所有GAC操作。

So, on a Win 2008 R2 Std x64, I have 6 (six) gacutil.exe all different (not counting ones in VS folders), in:

  1. c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin
  2. c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64
  3. c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
  4. c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64
  5. c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools
  6. c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64

Questions are:

  1. Does x64 versions have any difference in behaviour?
  2. Should I prefer v7.0A versions other v6.0A?
  3. Should I use NETFX 4.0 Tools versions for .NET 4.0 assemblies, and "standard" version for the rest?

Or, if there is some general type article on the subject, I will be grateful.

Update 1. Concerning Hans Passant's answer:

  1. gacutil.exe is a .NET Framework Tool part of a "Build, Deployment, and Configuration Tools (.NET Framework)" as now obsolete (!) shfusion.dll was;
  2. Indeed v6.0A are from VS2008 install, and can be ignored (1, 2);
  3. The 64-bit explanation theory also sounds reasonable. I also suppose that there is most probably an IA64 version of gacutil.exe, so it's like a "tool copy for each platform", it's just happend so that x86 version runs fine everywhere because of WoW64. Minus 2 gacutil version from the list (4, 6);
  4. The part about which version to use, seems to be wrong. V4.0 gacutil.exe detects and places assembly according to it's target CLR, and works fine for both .NET 4.0 and earlier version assemblies. So the question is, why leave V2.0 gacutil.exe? My guess would be for the purpose of deployment on environments there .NET4.0 is unavailable.
  5. To use or not to use GAC, wasn't in the question. So I leave last paragraph with no comments.

Update 2.

So, to me seems like one can safely use either number 3 (then .NET4.0 is unavailable) or number 5 otherwise for all GAC operations on Windows x86 and x64. And the answers to the questions are:

  1. No.
  2. Doesn't matter, but using newer versions seems more logical.
  3. No, you can always use NETFX 4.0 Tools version (if .NET4.0 is available) for all GAC operations.

解决方案

Short version: If you have .NET 4.0 installed, use NETFX 4.0 Tools version. Otherwise it doesn't really matter.

Answers to questions:

  1. No.
  2. Doesn't really matter unless there is no .NET 4.0 installed, in which case you should use NETFX 4.0 Tools version. Not sure if it is possible to have a v7.0 SDK and not have .NET 4.0 installed.
  3. No, you can always (and should) use NETFX 4.0 Tools version for all GAC operations.

这篇关于我应该用什么的Gacutil.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆