You can use the event AssemblyLoadto AppDomain.CurrentDomainto do this.
static void Main(string[] args)
{
AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad);
Assembly.Load("ICSharpCode.SharpZipLib");
Console.WriteLine("Completed loading");
}
static void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
Console.WriteLine("Loaded assembly " + args.LoadedAssembly.Location);
}
Please note that this will only work for assemblies that have been downloaded since the event was added. mscorlib, for example, already loaded before the call Main, because for this you need to execute Main.
, , , , .