Deployment and nGen.exe

  • Thread starter Thread starter William Reyes
  • Start date Start date
W

William Reyes

I have a question regarding the use of ngen.exe and dedployment.

I want to make sure I understand this correctly.
If I create an app that has an .exe as well as a couple of .dll's.
I can create a setup package, create a batch file (specifying the ngen
commands) run the install, call the batch file from within the setup program
and run ngen.exe on the .exe and .dll files.

This will create a native image in the machines GAC.

I guess my question is:
1. Is that the correct scenario?
2. Does the .net framework install ngen with the dotnetfx?
3. How can I know the location of the ngen.exe file? (ie if the users system
drive is D:\ instead of C:\)

Thanks.
William
 
1) Yep, that's the correct scenario.

2) Yep, the .net framework installs ngen.

3) In the registry, you'll find the reg value "InstallRoot" under
HKLM\Software\Microsoft.NET\framework\. That will point to the place where
all of the runtimes are installed. Append the version of the runtime you
want to the value of "InstallRoot", and that's where you'll find ngen.

Tim

--------------------
 
Thanks Tim.
Tim Kurtzman said:
1) Yep, that's the correct scenario.

2) Yep, the .net framework installs ngen.

3) In the registry, you'll find the reg value "InstallRoot" under
HKLM\Software\Microsoft.NET\framework\. That will point to the place where
all of the runtimes are installed. Append the version of the runtime you
want to the value of "InstallRoot", and that's where you'll find ngen.

Tim
 
Also note that native images are not installed in the "GAC" (this is a
common misconception). Native images are installed in a directory that is a
sibling of the GAC, but these are very different storage locations.

..\lan
 
Back
Top