global-assembly-cache

Methods to programmatically install a .NET assembly into the GAC

孤者浪人 提交于 2019-11-29 18:21:35
问题 I need to create a small app or script to install a .NET assembly into the GAC. I've read there are a couple ways to do this including: using gacutil.exe executing the following line of code: new System.EnterpriseServices.Internal.Publish().GACInstall("Foo.dll"); However, what would happen if I just created the appropriate directories on the machine and copied the assembly into that directory? The structure of the GAC directory is the following: C:\Windows\assembly\GAC_MSIL\Foo\<version#>__