This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- NGEN still not called correctly
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2009
08:39 AM
NGEN still not called correctly
Hi,
After all this time, and after all these threads about the .NET Precompile assembly not working properly, IS 2010 still does not solve the problem!
Let's assume I have 3 .NET 2.0 assemblies: Assembly1.dll, Assembly2.dll and Assembly3.dll , each in its own component.
Let's assume that I set the ".NET Precompile Assembly" setting to "Yes" for each assembly.
What the generated custom action calls is:
Forget it! That doesn't work!
What should be called on installation is:
It is not complicated, is it?
Since .NET 2.0,
Calling NGEN once with several assemblies, without any action does not work! It might have worked with .NET 1.1 (I'm even not sure), but it won't with .NET 2.0
On uninstallation, the /delete option is also no longer applicable!
Why has this issue not been solved in IS 2010?
The problem was already identified in InstallShield Windows 12, if I believe http://community.installshield.com/showthread.php?t=177347.
Has Acresso any bugfix in the pipeline?
Regards
After all this time, and after all these threads about the .NET Precompile assembly not working properly, IS 2010 still does not solve the problem!
Let's assume I have 3 .NET 2.0 assemblies: Assembly1.dll, Assembly2.dll and Assembly3.dll , each in its own component.
Let's assume that I set the ".NET Precompile Assembly" setting to "Yes" for each assembly.
What the generated custom action calls is:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe /nologo /silent "C:\Program Files\InstallDir\Assembly1.dll" "C:\Program Files\InstallDir\Assembly2.dll" "C:\Program Files\InstallDir\Assembly3.dll"
Forget it! That doesn't work!
What should be called on installation is:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe /nologo /silent install "C:\Program Files\InstallDir\Assembly1.dll"
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe /nologo /silent install "C:\Program Files\InstallDir\Assembly2.dll"
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe /nologo /silent install "C:\Program Files\InstallDir\Assembly3.dll"
It is not complicated, is it?
Since .NET 2.0,
- NGEN needs to be called separately for each assembly
- NGEN requires an action: either "install" or "uninstall"
Calling NGEN once with several assemblies, without any action does not work! It might have worked with .NET 1.1 (I'm even not sure), but it won't with .NET 2.0
On uninstallation, the /delete option is also no longer applicable!
Why has this issue not been solved in IS 2010?
The problem was already identified in InstallShield Windows 12, if I believe http://community.installshield.com/showthread.php?t=177347.
Has Acresso any bugfix in the pipeline?
Regards
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2009
11:08 AM
This is being tracked in our system as IOC-000061592. It's been languishing a little, as the perceived benefit to cost ratio has been undervalued. I'll add your report to the mix, and that should help to tilt this in your favor.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 04, 2009
09:14 AM
Hi Michael,
Thank you for your answer.
Is there any more accurate plan as to when a hotfix could be made available?
It would be so much easier if that feature was working, as it would save me much work in defining 2 custom actions for each .NET assembly I need to precompile.
Regards
Thank you for your answer.
Is there any more accurate plan as to when a hotfix could be made available?
It would be so much easier if that feature was working, as it would save me much work in defining 2 custom actions for each .NET assembly I need to precompile.
Regards
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 04, 2009
12:03 PM
I don't have any information on when this would be made available. However if you are making 2 actions for each of n assemblies, and n is a noticeable number, you should probably consider a different approach. Add a custom table, say NgenAssembly which has a foreign key into the Component or File table. Then have your custom action walk this table and component states to figure out which files need to be processed. This way you can have just one set of custom actions (probably one prepare/costing action, one deferred execution, one commit and one rollback; possibly you'll want an earlier set for uninstall as well...)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2009
01:37 AM
Hi Michael,
Thanks for your answer.
I am considering a different approach indeed and your idea makes sense.
But instead of creating my own table, I might just define the components in a string, like
It would obviously be easier to use the .NET Precompile Assembly setting.
That's why I would have liked to know whether this fix would be available soon, or whether I should really implement this workaround.
Regards
Thanks for your answer.
I am considering a different approach indeed and your idea makes sense.
But instead of creating my own table, I might just define the components in a string, like
#define NGENCOMPONENTLIST "MyComponent1,MyComponent2,MyComponent3"and parse it.
It would obviously be easier to use the .NET Precompile Assembly setting.
That's why I would have liked to know whether this fix would be available soon, or whether I should really implement this workaround.
Regards
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2009
11:31 AM
Oh certainly, you can just shove them in a property. If you're careful, you can probably even use the property we currently create when you select the Precompile Assembly option, but you'll want to replace the custom actions we create each time you modify that option.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2009
12:18 PM
MichaelU wrote:
Oh certainly, you can just shove them in a property. If you're careful, you can probably even use the property we currently create when you select the Precompile Assembly option, but you'll want to replace the custom actions we create each time you modify that option.
I typically leave the custom actions in place, I just nullify their conditions by putting a 0 in the condition field.
I've done as you suggested in the past with regard to creating a custom table and processing the entries. It worked pretty well.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 03, 2009
08:55 PM
MichaelU wrote:
... Add a custom table, say NgenAssembly which has a foreign key into the Component or File table. Then have your custom action walk this table and component states to figure out which files need to be processed. This way you can have just one set of custom actions (probably one prepare/costing action, one deferred execution, one commit and one rollback; possibly you'll want an earlier set for uninstall as well...)
Or, Acresso could fix this necessary feature.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 12, 2009
01:01 PM
Hi,
As I have finally been working on the workaround, I have noticed 2 more problems related to this issue:
Michael, could you please add these 2 points to IOC-000061592, if it hasn't been done already?
All this gives me the impression that this functionality has not been tested at all before releasing IS 2010! That's a shame. WiX seems to do a better job.
As I have finally been working on the workaround, I have noticed 2 more problems related to this issue:
- When you activate the precompilation in the component .NET settings, 2 custom actions appear in the InstallExecuteSequence: ISJITCompileActionAtInstall and ISJITCompileActionAtUnInstall.
But there is no corresponding rollback action, so the native assemblies are not removed from the native assembly cache if an action fails after ISJITCompileActionAtInstall. - The condition of ISJITCompileActionAtInstall is wrong: IS 2010 sets it to Remove<>"ALL". It should be REMOVE<>"ALL". Indeed, the Remove property is empty, so Remove<>"ALL" is always TRUE.
Michael, could you please add these 2 points to IOC-000061592, if it hasn't been done already?
All this gives me the impression that this functionality has not been tested at all before releasing IS 2010! That's a shame. WiX seems to do a better job.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 01, 2014
05:36 PM
It's been 5 years now and this still hasn't been fixed in InstallShield 2014 Version 21. It seems like something that would take a developer only a few hours to fix. Why not fix it?
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)