MBonevil
Posts: 45
Joined: Fri Jan 22, 2010 4:48 pm

NGEN with Framework 1.1

Wed Jul 07, 2010 3:46 pm

Hi,

I install third party DLL (Syncfusion) and I want to add it in the GAC and run NGEN for all DLL.

I install some DLL that use framework 1.1 and some others that uses framework 2.0.

All DLL are correctly added in GAC.

All framework 2.0 DLL are installed correctly with NGEN.

Here's the problem:
All framework 1.1 DLL are not installed correctly with NGEN.

I install my application with the log.

Here's the command line used by the installer for framework 1.1:
C:\Windows\Microsoft.NET\Framework\v1.1.4322\ngen.exe install "Syncfusion.Core, Version=4.401.0.51, Culture=neutral, PublicKeyToken=632609b4d040f6b4"

The command line option "install" for ngen.exe 1.1 is not supported.
The command line should be:
C:\Windows\Microsoft.NET\Framework\v1.1.4322\ngen.exe "Syncfusion.Core, Version=4.401.0.51, Culture=neutral, PublicKeyToken=632609b4d040f6b4"

I really need this feature to work.

Best regards,

Martin

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: NGEN with Framework 1.1

Wed Jul 07, 2010 4:13 pm

Hi Martin,

Please note that Advanced Installer supports ngen only for .NET Framework 2.0 or higher. For older versions you can try using a custom action. You can use a search to find ngen.exe and then use the search property in the custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MBonevil
Posts: 45
Joined: Fri Jan 22, 2010 4:48 pm

Re: NGEN with Framework 1.1

Wed Jul 07, 2010 4:29 pm

mmm... the installer is generated correctly (except for the option "install").

If I must use a custom action, can you explain me in detail:
- How to find the ngen.exe for framework 1.1
- How to use the result to ngen my DLL
- How I can find the DLL name in the GAC (like: "Syncfusion.Core, Version=4.401.0.51, Culture=neutral, PublicKeyToken=632609b4d040f6b4" )

Best regards,

Martin

Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: NGEN with Framework 1.1

Thu Jul 08, 2010 1:42 pm

Hi,
How to find the ngen.exe for framework 1.1
This can be done very easily using a file search from the Search page. The name of the search is actually an installer public property so if it finds the file it will
contain the exact path for it, otherwise it will be an empty string.
- How to use the result to ngen my DLL
You will need to read the value of public property(name of the search) using a special API. Here is an example.
- How I can find the DLL name in the GAC (like: "Syncfusion.Core, Version=4.401.0.51, Culture=neutral, PublicKeyToken=632609b4d040f6b4" )
Since this is not done by a simply file search you can try using another custom action that retrieves all this information from the registry or any other places where it is kept.
You will need to consult MSDN in order to find out more about how the OS stores all this information.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MBonevil
Posts: 45
Joined: Fri Jan 22, 2010 4:48 pm

Re: NGEN with Framework 1.1

Thu Jul 08, 2010 2:53 pm

Hi,

Thanks for the information.

For the custom action that will execute the ngen.exe, where I need to create it ?

Begin step ?, SelfRegModules step ?

Best regards,

Martin

GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact:  Website

Re: NGEN with Framework 1.1

Fri Jul 09, 2010 9:29 am

Hello,

You will want to execute ngen.exe on the dll you are installing, if I am understanding this correctly, you will want to run ngen after the dll(s) have been installed, meaning you should either place it after InstallFiles and set it to deferred execution, or after InstallExecute and set it to Immediate execution.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”