Call .net framework ngen.exe to generate native code

Got a problem you cannot solve? Try here.
bernaert
Posts: 12
Joined: Wed Nov 23, 2005 10:41 am

Call .net framework ngen.exe to generate native code

Postby bernaert » Fri Nov 25, 2005 9:31 am

Hello,

I would like to call the ngen.exe of the .net framework to generate native applications of my assemblies that I just installed with the installation procedure.
How would I do this in the installation?
How can I get the path to the ngen.exe and how do i launch commands with the ngen.exe on my assemblies as the assemblies can be installed in any directory if the user selects another directory than the default directory?

Thx,
Bernaert Dominique.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Fri Nov 25, 2005 10:31 am

There is already a built in command which generates native images - its called Generate Native Images. So you don't have to worry about locating ngen.exe. Moreover, you can use the $TARGETDIR$ variable to read the folder that is the end-user chosen installation folder at runtime.

bernaert
Posts: 12
Joined: Wed Nov 23, 2005 10:41 am

Faboulous

Postby bernaert » Fri Nov 25, 2005 10:59 am

Faboulous!
This works with the .net 2.0 plugin also?

Thx,
Bernaert Dominique.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Fri Nov 25, 2005 11:06 am

I believe it should - please try it out and let me know if it does not.

bernaert
Posts: 12
Joined: Wed Nov 23, 2005 10:41 am

Postby bernaert » Fri Nov 25, 2005 11:30 am

I think it doesn't.
I've added generation of a native image to one assembly to the installation.
Ran it in a vmware box.
Searched using ngen display to see if there is a native image, and it didn't find one.
Please note that ngen of framework 2.0 must be called with the install parameter and you can call the main executable, it will automatically create native images of all depending assemblies.
It would maybe be usefull to integrate a call to ngen with the uninstall parameter when uninstalling the application.

Thx,
Bernaert Dominique.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Fri Nov 25, 2005 12:18 pm

I'll escalate this to the product team and see what they come back with. Thanks for reporting!

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Fri Nov 25, 2005 12:40 pm

This issue has been confirmed. Thank you for reporting. A resolution will shortly be available.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 174 guests