- Why Does Your Application Need Configuration?
- Working with the Global Assembly Cache (GAC)
- Configuring Assemblies
- Adding Configured Applications
- Making Changes Manually
- Configuration Is Here to Stay
Working with the Global Assembly Cache (GAC)
Many developers use the .NET Configuration toollocated in the Administrative Tools folder of the Control Panelto overcome security problems, but it has a lot more to offer. For example, this tool lets you use a graphical interface to view registered assemblies in the Global Assembly Cache (GAC) and add new ones, as shown in Figure 1. The help topic for each folder in the .NET Configuration tool lets you know what tasks you can perform in that area. Using this tool is easier than using utilities such as Global Assembly Cache Utility (GACUtil), which you use to register assemblies with strong names for global use.
NOTE
The correct term is Global Assembly Cache, despite the fact that Microsoft tends to leave out Global in some of the tools, as you might notice in the screenshots.
Figure 1 Use the .NET Configuration tool to view the current assembly entries or to add new ones.
To add an assembly to the GAC, click Add an Assembly to the Assembly Cache to display the Add an Assembly dialog box. Choose the assembly you want to add to the GAC and click Open. The .NET Configuration tool adds the assembly. If something is screwed up, you get an error message. If all goes as planned, though, no success message is displayed.
To remove an assembly from the GAC, click View List of Assemblies in the Assembly Cache. The main display changes to show all of the assemblies in the GAC. Right-click the assembly you want to remove and choose Delete from the context menu. The .NET Configuration tool will display a confirmation dialog box. Click Yes to make the deletion permanent.
Of course, this leaves you at the list of assemblies rather than at the list of tasks that you can perform. When you want to return to the task list, right-click Assembly Cache in the left pane and choose View, Help Topic from the context menu.