Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Register Multiple Assemblies to the GAC in Vista

Tags:

I've got a whole directory of dll's I need to register to the GAC. I'd like to avoid registering each file explicitly- but it appears that gacutil has no "register directory" option. Anyone have a fast/simple solution?

like image 343
Evan Avatar asked Aug 29 '08 18:08

Evan


1 Answers

GACUTIL doesn't register DLLs -- not in the "COM" sense. Unlike in COM, GACUTIL copies the file to an opaque directory under %SYSTEMROOT%\assembly and that's where they run from. It wouldn't make sense to ask GACUTIL "register a folder" (not that you can do that with RegSvr32 either).

You can use a batch FOR command such as:

FOR %a IN (C:\MyFolderWithAssemblies\*.dll) DO GACUTIL /i %a 

If you place that in a batch file, you must replace %a with %%a

like image 182
Euro Micelli Avatar answered Sep 29 '22 06:09

Euro Micelli