Ngen.exe precompiles all the apps on the machine that have been used and do not have native images. If you are building a 64-bit app, select. If you are using a 64-bit computer, there is also a. NET Framework NGEN 4.x from the task list. In the left-hand pane of Task Scheduler, expand Task Scheduler Library. Search for "Task Scheduler" from the start screen.Open the Task Scheduler by doing one of the following: Run your app at least one time to ensure that Ngen.exe detects it.
The following procedure describes how to run Ngen.exe to precompile your app.
So, if you're not sure you're compiling your app to native code on your development machine, you could run the Native Image Generator (Ngen.exe) tool to precompile your app before you measure its startup time. Of course, you should take measurements that are representative of what the end user will experience. Look for a checkbox that says “Compile with. You can configure this in Visual Studio from the Build page in “Properties” (C#) or Compile->Advanced in "My Project" (VB). NET Native if you’re building it in “Release” mode, and it uses CoreCLR if you’re building it in “Debug” mode. On your development machine, by default your app uses. NET Core that can run on all devices, so they don’t depend on the in-box. NET Native statically link in a custom runtime and the new converged. NET Native toolchain.NET Native is an ahead-of-time compilation technology that converts MSIL into natively-runnable machine code.NET Native apps start faster, use less memory, and use less battery than their MSIL counterparts. This gives you a baseline for your measurement and ensures that you're measuring as reasonably short a startup time as possible.īy the time your UWP app arrives on your customers' computers, your app has been compiled with the. Measuring your app's startup timeīe sure to start your app a few times before you actually measure its startup time. This section provides suggestions on how to get better performance out of your app when it starts. For the purposes of this topic, an app's startup time begins when the user starts the app, and ends when the user can interact with the app in some meaningful way. In part, users perceive whether your app is fast or slow based on how long it takes to start up. Best practices for your app's startup performance Create Universal Windows Platform (UWP) apps with optimal startup times by improving the way you handle launch and activation.