Deployment and nGen.exe

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
 
T

Tim Kurtzman

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

--------------------
 
W

William Reyes

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
 
A

Alan Shi [MSFT]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top