alphonseg
Posts: 25
Joined: Sat May 25, 2019 1:49 am

Is My Precompiled Assembly being Utilized

Via the AI Assembly page, I'm generating native image for my exe. Destination private install to the application folder.
This works as, when I run ngen display <application folder\my exe>, it displays roots and native image.
When I run my app, I don't see any difference in startup.
How can i tell if the native image is being utilized?
My app shortcut is pointing to the exe in the application folder. Should it point elsewhere?
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Is My Precompiled Assembly being Utilized

Hello Alphonse,
When I run my app, I don't see any difference in startup.
As it states in the "Assembly Properties" article:
NET assemblies can be precompiled at install time to generate their native image. Native images can significantly improve memory use when code is shared between processes. Also, precompiling assemblies can improve the startup time for some applications.
As you can see, precompiling assemblies can improve the startup time for some applicaiton, but that is not a rule.
My app shortcut is pointing to the exe in the application folder. Should it point elsewhere?
The shortcut of your application should point to wherever your application is located.

Please let me know if there is anything else I could help you with.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alphonseg
Posts: 25
Joined: Sat May 25, 2019 1:49 am

Re: Is My Precompiled Assembly being Utilized

Thank you.
To simplify, Windows will run the precompiled assembly, even though my shortcut points to the exe in the application folder. Corrrect?
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Is My Precompiled Assembly being Utilized

Hello Alphonse,

If your .NET assembly (in this case, your executable) is precompiled at install time (in order to generate its' native image), then the answer is yes.

The shortcut simply points to your executable - if it was precompiled, then it will be launched as such.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alphonseg
Posts: 25
Joined: Sat May 25, 2019 1:49 am

Re: Is My Precompiled Assembly being Utilized

Thank you!
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Is My Precompiled Assembly being Utilized

You are always welcome, Alphonse!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”