Tuesday, January 19, 2010, 12:52 - .NET
Posted by Administrator
Reference the system.EnterpriseServicess assembly to your project.
Posted by Administrator
using System.EnterpriseServices.Internal;
public void Update(DirectoryInfo folder_GAC)
{
//check if folder containing new dll files exists
if(folder_GAC.exists){
//add each dll found in this folder to the Global Assembly Cache
foreach (FileInfo dll in folder_GAC.GetFiles("*.dll"))
{
//instantiate a new Publich object and install the dll
Publish objpublish = new Publish();
objpublish.GacInstall(dll.FullName);
}
}
}
remove an assembly from the GAC can be done by using the GacRemove(string name) method.
more information:
http://msdn.microsoft.com/en-us/library ... blish.aspx




( 3 / 596 )

Tom Van Gaever - Blog
Avatar






