ngen

Is there any way to change the .NET JIT compiler to favor performance over compile time?

I was wondering if there's any way to change the behavior of the .NET JIT compiler, by specifying a preference for more in-depth optimizations. Failing that, it would be nice if it could do some kind of profile-guided optimization, if it doesn't already. ...

Can you use the Phoenix compiler as a more powerful NGEN?

In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL. Can I use it to transform a pure .Net app into a pure native app? By which I mean, it will not hav...

Where can I download the latest ngen.exe?

I am using ngen.exe (the .Net Native Image Generator) version 2.0.50727.312. Is this the latest version? If not, where can I download the latest version? This page on msdn... http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx ... does not appear to have a link to a download. If it matters, I need ngen.exe for .Net Framework 3.5. Th...

Does it help to use NGEN ?

Is it better to use NGEN an ASP.NET application when we know it is not going to change much ? Or is the JIT good enough ? Thanks, Chak. ...

Is it possible to use NGen with ClickOnce deployment?

Is it possible to use NGen with ClickOnce deployment? ...

How do I run nGen at the end of the installation (MSI)?

I would like to execute nGen at the end of my installation simply to improve the perceived performance of the first startup of my application. How could I do that? Is there are some best practices? Can I be sure that nGen is always installed with .NET Framework? Thanks! ...

Need help getting NGen back into working condition.

NGen is unhappy on my computer, and i can't find a way to get a deep understanding of what is going wrong. After every startup, ngen logs this message: .NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Service reached limit of transient errors. Will shut down. Last error returned from Service Manager: 0x...

Generating Native Images outside the Cache

I would like to use NGEN.EXE in order to generate native images of my assemblies before I create my installer. I am hoping this will keep my binaries Reflector-proof. Am I correct about this? I have just come to understand that all native images are now being stored in the Native Image Cache. Is there a way to get native binaries which ...

Have you ever used ngen.exe?

Has anybody here ever used ngen? Where? why? Was there any performance improvement? when and where does it make sense to use it? ...

.NET JIT'ed assemblies in sharable pages

When running a .NET 2.0 WinForms app in a Terminal Services environment, I'm seeing some unexpected results that I can't quite explain. Everything I have read has indicated that JIT'ed assemblies (i.e., not using NGen to create native images) result in all code space being stored in private pages, increasing working set size / memory pr...

NGen and Gacutil best practices

Hi there, This is my first post, so please forgive me if this isn't written well. I've been working on a WinForms application which has about 5 referenced assemblies - written by us, and about 8 referenced assemblies by third parties (we wont be hoping to update them in the future unless something goes terribly wrong - Infragistics/Dev...

.NET assembly cache / ngen / jit image warm-up and cool-down behavior

Hi, I have an Input Method (IME) program built with C#.NET 2.0 DLL through C++/CLI. Since an IME is always attaching to another application, the C#.NET DLL seems not able to avoid image address rebasing. Although I have applied ngen to create a native image of that C#.NET 2.0 DLL and installed it into Global Assembly Cache, it didn't i...

Step-by-step ngen with Wix 3.0

We use Wix to build an installer for our .NET application and are just in the process of porting to Wix 3.0. Our application includes several .NET assemblies (as is the way with .NET applications) and the final installer step is to ngen these. This is important as our application takes about twice as long to startup with non-ngen'ed ass...

How to debug a WER minidump of an "ngen"ed image

When ngen is executed on a .NET managed application at installation time, and a crash dump is retrieved from Windows Error Reporting for the app, how can you use it to see a stack trace, variables, etc.? Here's some background related to the question: We have a .NET app that gets ngened at installation. When it crashes due to an unhandl...

Does it make sense to distribute pre-NGEN-ed assemblies?

I've found a few interesting links on using NGEN as a final step in an installer from this post. Is there a reason it is preferred to NGEN your assemblies at setup time, instead of at build time? I'm not particularly concerned with setup time, but it just seems like an unnecessary step that could be automated by my build. ...

How can I decrease startup and running time in .net applications?

I use C# to write windows applications with the .NET framework. How can I decrease startup time for these applications? My applications feel very slow during startup and initialization, particularly when showing the initial form. My application works with an Access (MDB) database to save data. In some forms it loads data, but the first ...

How to determine if assembly has been ngen'd?

How can you determine whether a particular .Net assembly has already been ngen'd or not? I need to check from code. Even invoking the command-line would be fine. At the moment I can't see any way of determining this. ...

Determine if GAC'ed & NGen'ed assemblies are being used.

How do I determine if the Native images are being used without the Loader verifing the signature of the assembly at runtime, or even using the GAC'ed assembly? I have complex system that we're experimenting with NGen but currently we're running the exe from the folder where all the DLL's are located due to a lot of late binding dependen...

bundle .NET dlls to run application in .NET-less machine?

AFAIK, ngen turns MSIL into native code (also reffered to as pre-JIT), however I never payed too much attention at it's startup performance impact. Ngen'd applications still require the .NET base class libraries (the runtime). Since the base class libraries have everything our .NET assemblies need (correct?) would it be possible to ship...

Securing against dynamic linking in .NET

I want to deploy an application with a license attached. However, I want to prevent that my dll can be easily referenced in visual studio. What are the usual ways of doing this? I was thinking about ngen-ing the application to prevent this, however, then the code becomes architecture dependent. Im not targetting any other architecture/p...