This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- .Net Applications & ngen
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 13, 2008
08:39 AM
.Net Applications & ngen
I was asked to perform ngen.exe on the application after installing the binaries but this ngen process must be done as part of the installation. The purpose that I was told is that ngen will compile and generate processor binaries and save it so that the user will not experience the extra delay that would occur at the first ever run of the application.
Is there some designated InstallShield power for this? Or do I have to call ngen.exe somehow, in a Custom Action or so?
Thanks for pointers in advance.
Is there some designated InstallShield power for this? Or do I have to call ngen.exe somehow, in a Custom Action or so?
Thanks for pointers in advance.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 13, 2008
10:09 AM
Make each assembly the keyfile of it's own component and then set the ".NET Precompile Assembly" component attribute to Yes.
As an aside, I usually question developers who ask for this if they have done profiling and are sure this is what they want. Many .NET developers don't truly understand NGEN and sometimes think it will be a magical cure all for upstream application design problems. It's also been known to break more then one install since your calling EXE (ngen) custom actions at install time.
One particular story comes to mind ( can't find the link ) is a Windows Update that dumped a bunch of assemblies then NGEN'd them with a high priority basically making the machines very sluggish for 30-60 minutes after applying the patch.
Good link on this subject is:
http://blogs.msdn.com/clrcodegeneration/archive/2007/09/15/to-ngen-or-not-to-ngen.aspx
As an aside, I usually question developers who ask for this if they have done profiling and are sure this is what they want. Many .NET developers don't truly understand NGEN and sometimes think it will be a magical cure all for upstream application design problems. It's also been known to break more then one install since your calling EXE (ngen) custom actions at install time.
One particular story comes to mind ( can't find the link ) is a Windows Update that dumped a bunch of assemblies then NGEN'd them with a high priority basically making the machines very sluggish for 30-60 minutes after applying the patch.
Good link on this subject is:
http://blogs.msdn.com/clrcodegeneration/archive/2007/09/15/to-ngen-or-not-to-ngen.aspx