I also wanted to know why 2 GAC and found the following explanation by Mark Miller in the comments section of .NET 4.0 has 2 Global Assembly Cache (GAC):
Mark Miller said... June 28, 2010 12:13 PM
马克米勒说……2010年6月28日下午12:13
Thanks for the post. "Interference issues" was intentionally vague. At the time of writing, the issues were still being investigated, but it was clear there were several broken scenarios.
谢谢你的帖子。“干涉问题”故意含糊其辞。在撰写本文时,这些问题仍在调查中,但很明显,有好几种情况已经被打破。
For instance, some applications use Assemby.LoadWithPartialName to load the highest version of an assembly. If the highest version was compiled with v4, then a v2 (3.0 or 3.5) app could not load it, and the app would crash, even if there were a version that would have worked. Originally, we partitioned the GAC under it's original location, but that caused some problems with windows upgrade scenarios. Both of these involved code that had already shipped, so we moved our (version-partitioned GAC to another place.
例如,一些应用程序使用Assemby。LoadWithPartialName加载程序集的最高版本。如果最高版本是用v4编译的,那么v2(3.0或3.5)应用程序就无法加载它,即使有一个版本可以运行,应用程序也会崩溃。最初,我们在它的原始位置对GAC进行分区,但是这在windows升级场景中造成了一些问题。这两个都涉及到已经发布的代码,因此我们将(版本分区的GAC)移动到另一个位置。
This shouldn't have any impact to most applications, and doesn't add any maintenance burden. Both locations should only be accessed or modified using the native GAC APIs, which deal with the partitioning as expected. The places where this does surface are through APIs that expose the paths of the GAC such as GetCachePath, or examining the path of mscorlib loaded into managed code.
这应该不会对大多数应用程序产生任何影响,也不会增加任何维护负担。应该只使用本地GAC api访问或修改这两个位置,这些api按照预期处理分区。这些地方是通过api来显示GAC的路径的,比如GetCachePath,或者检查加载到托管代码中的mscorlib路径。
It's worth noting that we modified GAC locations when we released v2 as well when we introduced architecture as part of the assembly identity. Those added GAC_MSIL, GAC_32, and GAC_64, although all still under %windir%\assembly. Unfortunately, that wasn't an option for this release.
值得注意的是,我们在发布v2时修改了GAC位置,当我们将体系结构作为程序集标识的一部分引入时也是如此。它们添加了GAC_MSIL、GAC_32和GAC_64,尽管它们仍然在%windir%\程序集之下。不幸的是,这个版本没有这个选项。
Hope it helps future readers.