I made a simple Windows Forms executable in C # (simple, I mean that it has about 20 methods, but this is just one window), focusing on the .NET Framework 2.0. When the application loads, it does nothing but the standard InitializeComponent(); in the constructor.
When you first open the application, it takes about 7 seconds to load into my Windows 8. Then it will take less than a second at the next moments when I open it.
On Windows XP, which I tried, it takes 30 seconds to load for the first time . A few of my friends, while testing the application, also complain that the download takes a lot of time for the first time (about 30 seconds). Then it runs faster (1 or 2 seconds).
I assume that this may be due to the fact that the .NET Framework has not yet been downloaded, so downloading them to your computer takes some time.
Have you ever experienced the same problem with .NET applications?
Do you have any clue why this is happening and how can I fix it?
EDIT - I see some people offer NGEN. However, if it is necessary to do this on all machines that will use the application, this may not be the solution for this. I want to publish my application to the general public from “regular users”, and this does not make sense if I demand that they make some additional materials for using my application. This is already so bad that we require the .NET Framework. My application should only be a standalone EXE without any dependencies (except the framework).
Thanks.
source share