Igor Kobylinskyi
Igor Kobylinskyi

Reputation: 19

.NET assemblies loading

I want to make the WPF application with loading my app logic assemblies behind the splash screen, like a NetBeans IDE with progress bar. I understand that my application is small and there is no sence in it, but i want do such thing if it can be done in .NET

Upvotes: 1

Views: 812

Answers (3)

Igor Kobylinskyi
Igor Kobylinskyi

Reputation: 19

To show the assemblies loading progress information first we determine which of the assemblies were not being loaded to the moment. So we need to know the full list of assemblies that would be loaded to the AppDomain (from referenced assemblies) and compare them to already loaded assemblies.

AppDomain.CurrentDomain.GetAssemblies()

Than we can force loading missed assemblies and display progress information.

foreach (AssemblyName assembly in assembliesToLoad)
{
    ShowAssemblyLoadingInformation(assembly);

    AppDomain.CurrentDomain.Load(assembly);

    ReportProgress();
}

Upvotes: 0

Jsinh
Jsinh

Reputation: 2579

Yes i agree with "fsimonazzi" idea. But if you think you need to do a lot of long processes in sync with the front splash screen loading to show the process progress and more cool stuffs you can do that by using the following article as reference :Splash Screen in WPF using custom application start-up class

Upvotes: 1

fsimonazzi
fsimonazzi

Reputation: 3013

Take a look at http://msdn.microsoft.com/en-us/library/cc656886.aspx

This really allows the .NET runtime to show a static splash screen while loading your assemblies.

Upvotes: 1

Related Questions