Something that always bothered me at my previous job was having to install the framework SDK to get a copy of gacutil.exe. I know the guys still there hate having to install the SDK on a server so they can manipulate the GAC. Richard Lander gives some interesting information on the topic, but he doesn't go into why it's not included in the redist.
Since I've been at MS, I've learned a great deal more about the Global Assembly Cache (GAC) and the fusion APIs. Last night, I was taking a shower after cutting my hair, and the reason came to me. That reason is... installers, or more importantly... uninstallers.
During a discussion recently, I heard an amazingly profound saying:
"It is better to fail to do, than to fail to undo"
I don't recall who said it, and they probably got it from someone else, but it is right on the money.
When programs uninstall, they have to correctly remove things they've placed in the GAC. Let's make up an example. Let's say I have some software company. We've developed a magical managed library that makes it wicked easy to develop our software, so we use it in all our products. Let's say that in our deployment model, it makes sense to deploy that library to the GAC. So, uninstalling our software should remove it from the GAC, right? We'll what if one of our other products is on the machine? We don't want to uninstall one and break the remaining one.
When you install an assembly into the GAC via the Fusion APIs, you do so with a traced reference. That reference tells Fusion "who" installed it. If 2 installers install the same assembly, it's smart enough to know not to remove the assembly until both uninstall.
GACUtil, as a management tool, enables you to use traced references as well, but it also allows you to install without a traced references. It also allows you to force uninstalls and do lots of other screwy things. In other words, the tool is too powerful. Devs need to be able to do screwy things. Administrators need to be able to do screwy things. Regular users don't. Give them an install package that handles everything. Otherwise, you're bound to have a support nightmare.
If I have time, or enough requests, we'll go into how to use the fusion APIs directly to manage the GAC.