Posted By: David Faust
The Microsoft .NET environment offers many new approaches for managing application components. One of the most important is the Global Assembly Cache, or GAC. This allows a .NET assembly to be shared among several applications. The GAC also allows multiple versions of an assembly to reside side-by-side for enhanced application management. See Working with Assemblies and the Global Assembly Cache on the MSDN site for additional information.
To manage assemblies within the GAC, Microsoft provides the Global Assembly Cache Tool, gacutil. With FairCom’s multiple .NET interfaces, this can be a handy tool to have in the developer’s or administrator’s back pocket when managing multiple versions of assemblies.
Two c‑treeACE .NET assemblies are available.
- C:\FairCom\V9.1.1\win32\bin\sql.ado.net\Ctree.Data.SqlClient.dll – The c‑treeACE SQL ADO.NET Data Provider. This is installed into the GAC by default in a typical c‑treeACE SQL installation.
- C:\FairCom\V9.1.1\win32\bin\ctree.isam.net.cs\FairCom.CtreeDb.dll – The c‑treeDB.NET ISAM Assembly
Should you need to manage multiple versions of these within the GAC, the following gacutil options are useful. Consult the full list from Microsoft, or the utility usage from the command line with no arguments.
List the assemblies in the GAC.
gacutil /l <assemblyname>
C:\Windows>gacutil /l Ctree.Data.SqlClient
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Ctree.Data.SqlClient, Version=126.96.36.199, Culture=neutral, PublicKeyToken=0ce7372
Ctree.Data.SqlClient, Version=188.8.131.52, Culture=neutral, PublicKeyToken=0ce7372
Number of items = 2
Install an assembly into the GAC. Include the full file name, path, and extension with this command.
>gacutil /i <assembly file name>
>gacutil /i C:\FairCom\V9.1.1\win32\bin\sql.ado.net\Ctree.Data.SqlClient.dll
Remove an assembly from the GAC.
>gacutil /u <assemblyname>
>gacutil /u Ctree.Data.SqlClient