Bugs item #1848752, was opened at 2007-12-11 11:41 Message generated for change (Comment added) made by tpaxatb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1848752&group_id=105970
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: extensions Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Doug S (tpaxatb) Assigned to: pmarcu (pmarcu) Summary: NativeImage CA never runs Initial Comment: When installing an application and calling ngen, the custom action ngen fails. The reason for this seems to be the CA scheduler's use of the MsiAssembly table to determine whether the assembly to be ngen'ed is installing into the GAC. The scheduler is examining `MsiAssembly`.`File_Manifest` to determine the assembly's installation status into the GAC; however, MSDN states that the determination is made by the `MsiAssembly`.`File_Application` column. When no manifest is specified for non-gac'ed assemblies, the scheduler incorrectly thinks that the assembly is being installed into the GAC, thus causing the ngen to ultimately fail. Workarounds seem to be to ensure an application base is specified in the NativeImage element, or to ensure that a manifest is specified for assemblies not in the GAC. ---------------------------------------------------------------------- >Comment By: Doug S (tpaxatb) Date: 2008-01-31 11:50 Message: Logged In: YES user_id=1342505 Originator: YES Yes, the AssemblyApplication attribute was set for the File element; and, as directed by the Wix docs, not set for the NativeImage element. However, the AssemblyManifest tag was *not* set (and as far as I can tell doesn't need to be set when the manifest is not external to the assembly). Therefore, the File_Manifest column in the MsiAssembly table is empty, but the File_Application table is NOT blank. According to the MSDN documentation, a blank File_Application entry indicates that the assembly is being installed in the GAC, which is born out by experimentation. However, the CA scheduler for the NativeImage examines the File_Manifest column and not the File_Application column (src\ext\NetFxExtension\ca\netfxca.cpp - vcsNgenGac select statement). Therefore, when the File_Manifest column is blank, the command line being run is ngen Strong_Assembly_Name rather than ngen File_Name, regardless of the contents of the File_Application column in the MsiAssembly table. Because of this, the AppBase attribute *must* be set so that ngen is able to resolve the strong_assembly_name parameter to ngen, regardless of the WiX documentation stating that it otherwise does not need to be set for executables. Whether or not the File_Manifest column is correctly populated (by me or wix itself) is, I think, irrelevant, because it still doesn't fix the underlying issue that the column being examnined by the scheduler to determine the fact that an assembly is being GAC'd is incorrect to begin with. If you really want I can attach an example, but it is not necessarily trivial, because there are a lot of permutations of the various attributes (File/@AssemblyApplication, File/@AssemblyManifest, NativeImage/@AppBaseDirectory, NativeImage/@AssemblyApplication) that affect the ngen scheduler's selection of command line. In addition, some of the permutations that enable the generator to work properly are not in line with the documentation. And I still can't figure out why the AppBaseDirectory attribute should be set when a DLL is installed to the GAC (according to the docs), since a GAC dll assembly does not necessarily *have* one single application. ---------------------------------------------------------------------- Comment By: mafelt (mafelt) Date: 2008-01-09 17:45 Message: Logged In: YES user_id=1977613 Originator: NO Was the 'AssemblyApplication' attribute used in the assembly's 'File' tag? Can a sample WiX file/snippet representing the problem be attached to this bug report? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1848752&group_id=105970 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-devs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-devs
