为什么框架的dll在几个地方屡禁不止? [英] Why are framework dlls repeated in several places?

查看:144
本文介绍了为什么框架的dll在几个地方屡禁不止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装.NET 4.0和得到一些问题,已经在这里我也意识到该框架DLL是在重复几个回答后对于不同的框架版本的地方(这是不是新的,它有previous版本的情况,但还没有重视到现在为止)

1 - GAC:%SYSTEMROOT%\组装

2 - 框架安装目录:%SYSTEMROOT%\ Microsoft.NET \框架\配...

3,如果你有安装了Windows SDK,还表现在:C:\ Program Files文件\微软的SDK \的Windows \

我认为最后的是所谓的引用程序集,并有额外的元数据,以帮助Visual Studio中,但

什么位置号码2?为什么组件重复出现?

解决方案
  1. 没有,那是通过3.5 GAC的位置.NET 1.x的。海关总署为4.0位于C:\ WINDOWS \ microsoft.net \组装。为什么它被移动并不清楚,可能是为了避免麻烦,直接从GAC,一大禁忌,但它已经完成引用的程序集的项目。

  2. 是的,引用程序集生活在那里。此外,在C:\ Program Files文件\引用程序集。他们最初存储在GAC的程序集的完整副本。直到您部署了某种修复程序。保持他们,你创建针对正确的框架组件程序独立保证,不是你发生什么事都存储在GAC中。

  3. 是的,没有任何框架组件是有,只是建立工具。

After installing .Net 4 and getting some questions that were already answered here I also realized how the Framework dlls are repeated in several places for the different Framework versions (this is not new, it happens with previous versions, but hadn't paid attention to it until now)

1 - GAC: %systemroot%\assembly

2- Framework installation directory: %systemroot%\Microsoft.NET\Framework\v...

3- and if you have the Windows SDK installed, also in: C:\Program Files\Microsoft SDKs\Windows\

I think the last ones are the so called "Reference Assemblies" and have extra metadata to aid Visual Studio, but

what about location number 2? Why are assemblies repeated there?

解决方案

  1. No, that's the GAC location for .NET 1.x through 3.5. The GAC for 4.0 is located in c:\windows\microsoft.net\assembly. Why it was moved isn't clear, probably to avoid trouble with projects that referenced assemblies directly from the GAC, a big no-no but it has been done.

  2. Yes, reference assemblies live there. Also in c:\program files\reference assemblies. They are initially verbatim copies of the assemblies stored in the GAC. Until you deploy some kind of hotfix. Keeping them separate ensures that you build programs that target the "proper" framework assemblies, not what you happen to have stored in your GAC.

  3. Yes, no framework assemblies are there, just build tools.

这篇关于为什么框架的dll在几个地方屡禁不止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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