I'm trying to use NGen to speed up the startup/response times for a .Net app. The application compiles (in Visual Studio) and runs happily inside and outside the IDE, but if I 'ngen' the main entry assembly, I get this:
Failed to load dependency BusinessObjects.Enterprise.Sdk of assembly CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken =692fbea5521e1304 because of the following error : The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The referenced Crystal libraries are from the GAC. The ngen command line is:
ngen install "\my_entry_assembly.exe"
Ngen finds most of the depedencies and deals with them, but not the ones above, the only ones that are in the GAC.
What is the explanation, and what can I do about this, short of separately ngenning the assemblies by explicit path to the GAC?