<p>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?</p>

[{'answer_id': 35057, 'author': 'Euro Micelli', 'author_id': 2230, 'author_profile': 'https://Stackoverflow.com/users/2230', 'pm_score': 6, 'selected': True, 'text': '<p>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).</p>\n\n<p>You can use a batch FOR command such as:</p>\n\n<pre><code>FOR %a IN (C:\\MyFolderWithAssemblies\\*.dll) DO GACUTIL /i %a\n</code></pre>\n\n<p>If you place that in a batch file, you must replace %a with %%a</p>\n'}, {'answer_id': 35064, 'author': 'Daniel Jennings', 'author_id': 3641, 'author_profile': 'https://Stackoverflow.com/users/3641', 'pm_score': 4, 'selected': False, 'text': "<p>Here is the script you would put into a batch file to register all of the files in the current directory with Gacutil. You don't need to put it in a batch file (you can just copy/paste it to a Command Prompt) to do it.</p>\n\n<pre><code>FOR %1 IN (*) DO Gacutil /i %1\n</code></pre>\n\n<p>Edit: Bah, sorry I was late. I didn't see the previous post when I posted mine.</p>\n"}, {'answer_id': 30016364, 'author': 'Legends', 'author_id': 2581562, 'author_profile': 'https://Stackoverflow.com/users/2581562', 'pm_score': 2, 'selected': False, 'text': '<p>Use </p>\n\n<blockquote>\n  <p>gacutil /il YourPathTo_A_TextFile.txt</p>\n</blockquote>\n\n<p>switch, if you have dlls in multiple different folders. Otherwise go with the <code>for ... in</code> loop mentioned by Euro.</p>\n\n<p>The text file should contain a list of assembly paths (one path per line) which should be installed. The paths can also be different folders all over the system.\nRun the command line as an administrator!</p>\n\n<p><strong>Here an example of the YourPathTo_A_TextFile.txt:</strong></p>\n\n<blockquote>\n  <p>C:\\...Microsoft.Practices.EnterpriseLibrary.Common.dll\n  C:\\...Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter.dll\n  C:\\...Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5.dll\n  C:\\...Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll\n  C:\\...Microsoft.Practices.EnterpriseLibrary.Configuration.EnvironmentalOverrides.dll\n  C:\\...Microsoft.Practices.EnterpriseLibrary.Data.dll</p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/35011', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/667/']