C# - Determine all loaded assemblies

By , 7/30/2013
(0 ratings)
This snippet determines all loaded assemblies (within the application domain).

Someone could use it by choosing "Copy Local" in reference properties. Through this property assemblies are automatically copied into the output directory -> advantageous when sharing the project with others (when licenses allow).

Author: Günther Foidl, translation by Michael List
Translate to VB
using System;
using System.Reflection;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main()
		{
			Assembly[] appAssemblies = AppDomain.CurrentDomain.GetAssemblies();

			for (int i = 0; i < appAssemblies.Length; i++)
				Console.WriteLine(
					"Assembly {0}: {1}\n", i + 1, appAssemblies[i].FullName);
		}
	}
}
Tagged with Assembly, Assemblies.

Comments

 

Log in, to comment!