<p>How can I determine all of the assemblies that my .NET desktop application has loaded?  I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC.</p>

<p>It would be nice to see both managed and unmanaged assemblies.  I realize the list will get long but I plan to slap an incremental search on it.</p>

[{'answer_id': 20970, 'author': 'Nick', 'author_id': 1490, 'author_profile': 'https://Stackoverflow.com/users/1490', 'pm_score': 0, 'selected': False, 'text': '<p>Looks like <code>AppDomain.CurrentDomain.GetAssemblies();</code> will do the trick :)</p>\n'}, {'answer_id': 20974, 'author': 'Greg Hurlman', 'author_id': 35, 'author_profile': 'https://Stackoverflow.com/users/35', 'pm_score': 5, 'selected': True, 'text': '<pre><code>using System;\nusing System.Reflection;\nusing System.Windows.Forms;\n\npublic class MyAppDomain\n{\n  public static void Main(string[] args)\n  {\n    AppDomain ad = AppDomain.CurrentDomain;\n    Assembly[] loadedAssemblies = ad.GetAssemblies();\n\n    Console.WriteLine("Here are the assemblies loaded in this appdomain\\n");\n    foreach(Assembly a in loadedAssemblies)\n    {\n      Console.WriteLine(a.FullName);\n    }\n  }\n}\n</code></pre>\n'}, {'answer_id': 20975, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 2, 'selected': False, 'text': "<p>Either that, or System.Reflection.Assembly.GetLoadedModules().</p>\n\n<p>Note that AppDomain.GetAssemblies will only iterate assemblies in the <em>current</em> AppDomain. It's possible for an application to have more than one AppDomain, so that may or may not do what you want.</p>\n"}, {'answer_id': 21108, 'author': 'denis phillips', 'author_id': 748, 'author_profile': 'https://Stackoverflow.com/users/748', 'pm_score': 0, 'selected': False, 'text': '<p>For all DLLs including unmanaged, you could pinvoke EnumProcessModules to get the module handles and then use GetModuleFileName for each handle to get the name.</p>\n\n<p>See <a href="http://pinvoke.net/default.aspx/psapi.EnumProcessModules" rel="nofollow noreferrer">http://pinvoke.net/default.aspx/psapi.EnumProcessModules</a> and <a href="http://msdn.microsoft.com/en-us/library/ms683197(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms683197(VS.85).aspx</a> (pinvoke.net does not have the signature for this but it\'s easy to figure out).</p>\n\n<p><em>For 64 bit you need to use EnumProcessModulesEx</em></p>\n'}, {'answer_id': 5847255, 'author': 'bernd_k', 'author_id': 522317, 'author_profile': 'https://Stackoverflow.com/users/522317', 'pm_score': 2, 'selected': False, 'text': '<p><strong>PowerShell Version:</strong></p>\n\n<pre><code>[System.AppDomain]::CurrentDomain.GetAssemblies()\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/20959', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1490/']