I want to show my application assembly loaded first when starting application.
After application starts running, my code does not show anything.
public Form1()
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyLoad += new
AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad);
}
void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
Debug.WriteLine("Loaded " + args.LoadedAssembly.FullName);
label1.Text = "Loaded " + args.LoadedAssembly.FullName;
Thread.Sleep(500);
}
Where is the problem?
You should call it in your Main();
When the form is showing up, all assemblies are loaded, see https://msdn.microsoft.com/pl-pl/library/system.appdomain.assemblyload(v=vs.110).aspx