2
votes

I'm new to .NET and I have few simple questions regarding the GAC.

First of all, as far as I understand the GAC in .NET 3.5 is different from the GAC in .net 4.0 .

I also know that there are two main tools for managing the GAC : gacutil and Assembly Cache Viewer which is integrated in Windows Explorer. So my questions are the following :

  • Why is Assembly Cache Viewer obsolete in .NET 4.0 ?
  • I have installed .NET 4.0 and I have to GACs. How to tell gacutil.exe to target only one of the GACs ?
  • I guess there are many duplicate assemblies in the two GACs am I right ?

Thank you in advance

1

1 Answers

3
votes

You have one GAC for the .Net 2.0 runtime and a separate GAC for the .Net 4.0 runtime.

Similarly, there are two versions of gacutil.exe, one for each runtime.
Each one will only affect its GAC.

Ordinarily, there are no duplicate assemblies; the .Net 2.0 GAC contains .Net 2.0 assemblies and the .Net 4.0 GAC contains .Net 4.0 assemblies.
However, it is possible to add the smae .Net 2.0 assembly to both GACs. (by running both gacutils)