Wednesday, 15 April 2015

c# - Make .NET executable to load faster in the first time -


In C #, I made a simple Windows application executable (simple, I mean there are 20 ways in it, but this is just a window), targeting. .NET Framework 2.0 When the app loads, this default initial element (); does nothing more than the manufacturer.

The first time I open, the app takes approximately 7 seconds to load in my Windows 8 here. So it takes less than a second in the next time. I to open it

In Windows XP I tried, it takes 30 seconds to load for the first time Some of my friends, while testing the application, also complain that for the first time loading It takes a lot of time (about 30 seconds) then it takes fast (1 or 2 seconds).

I think this may be because the .NET Framework is not loaded yet, so it takes some time to load them into their machines.

Have you ever experienced the same problem with .NET applications?
Do you have any clue why this happens and how can I fix it?

Edit - I see some people NGN are suggesting, however, if it should be done in every machine that will use the application, then it can not be solved. I want to release my application to the big public of "common users", and if I need to do some extra stuff to use my application, then it does not make sense. It is already quite bad That we need the .NET Framework

Thank you.

You can try to pre-generate the original image using NGEN, which The app will use .NET when loading.

You can find more information here -

These are dependent on the platform and are usually not transferable, so you will need to do this on each machine.

No comments:

Post a Comment