September 30, 2010
.NET, GAC and c-treeACE Assemblies
Note: c-treeACE became FairCom DB in October 2020.
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
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=9.1.1.0, Culture=neutral, PublicKeyToken=0ce7372
7dc1039a8, processorArchitecture=MSIL
Ctree.Data.SqlClient, Version=9.3.0.0, Culture=neutral, PublicKeyToken=0ce7372
7dc1039a8, processorArchitecture=MSIL
Number of items = 2
- Install
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
- Uninstall
Remove an assembly from the GAC.
>gacutil /u <assemblyname>
>gacutil /u Ctree.Data.SqlClient