Thursday, January 28, 2021

[Snippet] Add/Remove an Assembly to/from the Global Assembly Cache using C#.Net

 


Code snippets to add remove an assembly from GAC - 

Add reference to - System.EnterpriseServices

using System.EnterpriseServices.Internal;


var path = "the absolute path of assembly";

 Publish publish = new Publish();

 publish.GacInstall(path);

 publish.GacRemove(path);

Reference:

https://docs.microsoft.com/en-us/dotnet/framework/app-domains/install-assembly-into-gac#global-assembly-cache-tool

https://docs.microsoft.com/en-us/dotnet/framework/app-domains/how-to-remove-an-assembly-from-the-gac

.NET

0 comments :

Post a Comment

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me