Click here to Skip to main content
Click here to Skip to main content
Go to top

Installing and Uninstalling the Assemblies from GAC without using SDK Framework

, 20 Apr 2014
Rate this:
Please Sign up or sign in to vote.
To Install and Uninstall an Assembly from GAC, we need SDK framework to be installed on machine. By using this utility, you can install/uninstall the assemblies without the need of SDK framework.

Introduction

This sample code will install and uninstall the assemblies (.dll) in GAC. Normally, to install and uninstall an Assembly from GAC, we need SDK framework to be installed on the machine. But using this utility, you can install/uninstall the assemblies without the need of SDK framework. Before installation, you can find out whether the specified assembly is already installed or not. Similarly before uninstallation, you can find out whether the specified assembly is already uninstalled or not. In addition to this, you can also check whether the specified DLL depends on some other DLLs or not.

Background

In the normal scenario, if user wants to deploy the application and install the assemblies into GAC, then the deployment server must be having the SDK framework installed. By using the gacutil command user shall install the assemblies. Similarly, for uninstallation, SDK framework would be required on server. So this application removes the dependancy of SDK framework from deployment server. Now SDK framework is no more needed for installation and uninstallation of assemblies.

Using the Code

First, you need to select the DLL file which you want to install/uninstall from GAC. User can click on "Browse..." button to open the dialogbox. Then, user can click on "Install" button if specified assembly to be installed. After clicking on "Install" button, the code will first check whether the specified DLL is already installed or not. If yes, then simply display the info message to the user. If not, then DLL will be installed to the GAC and success message will be displayed to the user. User can click on "UnIntall" button if specified assembly is to be uninstalled. After clicking on "UnInstall" button, the code will first check whether the specified DLL is already uninstalled or not. If yes, then simply display the info message to the user. If not, then DLL will be uninstalled from the GAC and success message will be displayed to the user.

Points of Interest

I had a great experience while writing the code for my project. I could get the idea of removing the SDK framework dependancy from deployment environment. This was very useful for me.

History

  • 20th April, 2014: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mahendra Gupta
Team Leader
India India
I am working as a lead in a leading IT company. I am having around 6 years of experience in development, testing and deployment.

I am very passionate about learning and researching new things.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 20 Apr 2014
Article Copyright 2014 by Mahendra Gupta
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid