cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fweeee
Level 3

".NET Precompile Assembly" does not work

I'm using Installsheild 2009 (Professional), Version 15 (Evaluation), SP2. I'm making a basic MSI project for my .NET Application.

I want to precompile my .NET code (C# application), so I have set the ".NET Precompile Assembly" to Yes for the appropriate files (the output files from my .NET application).

Unfortunatly it does not do anything. When I check the native images (Windows\assembly\NativeImages_v2.0.50727_32) there are no entries for my application as I would expect.

I have been checking numerous things, none of which have helped so far. What should I be doing to rectify this?

A bit of extra information - the .net version of my application is v.2.0.50727, and it is 32 bit only.

Thanks.
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Is the assembly the keyfile of the component? Does the installer log show ngen being called?

BTW, my standard advice is have you done the profiling needed to know that there is any advantage in prejiting the assemblies in the first place?
0 Kudos
fweeee
Level 3

Christopher Painter wrote:
Is the assembly the keyfile of the component? Does the installer log show ngen being called?

BTW, my standard advice is have you done the profiling needed to know that there is any advantage in prejiting the assemblies in the first place?


Firstly, I dont quite understand what you mean by "assembly the keyfile of the component".

I have looked for a log file, but not found one. (I checked the event log, but this didnt have any detail in it).

I have no idea what profiling is, but I'll do some research into that.

Thanks.
0 Kudos
fweeee
Level 3

I've managed to get logging going. I'm not sure which bits are relevant for this, so I'm going for the bits which have ngen.exe in/around them (i'll put the log files in code blocks - hope it makes it easier to read).

The first:

[CODE]
AppSearch: Property: ISJITCOMPILEATINSTALLPROPERTY, Signature: ISJITCOMPILEATINSTALLSIGNATURE
MSI (c) (4C:4C) [15:06:46:913]: Note: 1: 1322 2:
MSI (c) (4C:4C) [15:06:46:913]: Note: 1: 1322 2:
MSI (c) (4C:4C) [15:06:46:913]: PROPERTY CHANGE: Adding ISJITCOMPILEATINSTALLPROPERTY property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe'.
AppSearch: Property: ISJITCOMPILEATINSTALLPROPERTYPARENT, Signature: ISJITPARENTSIG
MSI (c) (4C:4C) [15:06:46:913]: PROPERTY CHANGE: Adding ISJITCOMPILEATINSTALLPROPERTYPARENT property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\'.
AppSearch: Property: ISJITNGENPROPERTY, Signature: ISJITCOMPILEATINSTALLSIGNATURE
MSI (c) (4C:4C) [15:06:46:913]: PROPERTY CHANGE: Adding ISJITNGENPROPERTY property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe'.
Action ended 15:06:46: AppSearch. Return value 1.[/CODE]

then further down:
[CODE]MSI (s) (AC:08) [15:06:56:767]: PROPERTY CHANGE: Adding ISJITCOMPILEATINSTALLPROPERTY property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe'.
MSI (s) (AC:08) [15:06:56:767]: PROPERTY CHANGE: Adding ISJITCOMPILEATINSTALLPROPERTYPARENT property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\'.
MSI (s) (AC:08) [15:06:56:767]: PROPERTY CHANGE: Adding ISJITNGENPROPERTY property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe'.[/CODE]

Then a big jump (in the 13 meg log file), till we get to this near the bottom:
[CODE]MSI (s) (AC:08) [15:08:02:121]: Executing op: ActionStart(Name=ISJITCompileActionAtInstall,,)
Action 15:08:02: ISJITCompileActionAtInstall.
MSI (s) (AC:08) [15:08:02:121]: Executing op: CustomActionSchedule(Action=ISJITCompileActionAtInstall,ActionType=1138,Source=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe,Target=/nologo /silent ,)
MSI (s) (AC:08) [15:08:02:211]: Executing op: ActionStart(Name=BindImage,Description=Binding executables,Template=File: [1])
Action 15:08:02: BindImage. Binding executables
MSI (s) (AC:08) [15:08:02:211]: Executing op: ProgressTotal(Total=84,Type=1,ByteEquivalent=800000)[/CODE]

And then a bit later:
Property(S): ISJITCOMPILEATINSTALLPROPERTY = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe
Property(S): ISJITCOMPILEATINSTALLPROPERTYPARENT = C:\WINDOWS\Microsoft.NET\Framework\
Property(S): ISJITNGENPROPERTY = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe

And then a bit later:
Property(C): ISJITCOMPILEATINSTALLPROPERTY = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe
Property(C): ISJITCOMPILEATINSTALLPROPERTYPARENT = C:\WINDOWS\Microsoft.NET\Framework\
Property(C): ISJITNGENPROPERTY = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe


Does this help? Does this mean it tried to run ngen? Or was never attempted?
0 Kudos