Am I using ngen correctly?  
Author Message
Mateusz Rajca





PostPosted: Common Language Runtime, Am I using ngen correctly? Top

Hi!

First, I put the assembly in the gac (it is strong named). Then I do "ngen install AssemblyName.exe"

Will this give me the maximum performance

~Matt


.NET Development28  
 
 
nobugz





PostPosted: Common Language Runtime, Am I using ngen correctly? Top

You wouldn't put an .exe in the GAC, Ngen doesn't require it. Ngen provides faster startup but slower execution. Check this article for reference.


 
 
Mateusz Rajca





PostPosted: Common Language Runtime, Am I using ngen correctly? Top

So I only put the one Dll i have in the gac - and i ngen both the dll and exe

~matt


 
 
nobugz





PostPosted: Common Language Runtime, Am I using ngen correctly? Top

Just the .exe, Ngen automatically processes any dependencies. You'd only have to put the DLL in the GAC if it is used by another app.


 
 
Mateusz Rajca





PostPosted: Common Language Runtime, Am I using ngen correctly? Top

Ok. Thanks. So only the dll is in the gac and only the exe is ngened.