Adding a DLL to the Global Assembly Cache(GAC)


 Adding a DLL to the Global Assembly Cache(GAC)
Open the visual studio command prompt in administrative mode as shown below and navigate to the directory containing the .dll file (class library file) that is built.

 Navigate to the directory that contains the .dll file as shown below and type the command: gacutil /i followed by the name of the .dll file. here in the command the i stands for install. you can use the /u  to uninstall a dll from the GAC.
To navigate to the directory use the “cd” command in the command line 
for example:
Cd D:\Enlistment\Dax6HFSTABVMS\source\Application\VMSModel\Visual Studio Projects\C Sharp Projects\VMSRegressionBugDetails\bin\Debug
Command to add the assembly to the global assembly cache will be similar to this:
gacutil /i VMSRegressionBugDetails.dll

Click on the image to enlarge
 Press enter and the following screen will be displayed with the message saying
 “Assembly successfully added to cache”.
                                                          Click on the image to enlarge
 The dll is now added to the Global Assembly Cache.
This was successfully tested for a dll that was added to the GAC for the use in Dynamics Ax environment.





No comments:

Post a Comment