Thanks, I misunderstood that putting into the GAC was done by Netfx extension.

 

So with the following <File> element:

<File Id='DLLInGACAndNgen' Name='MyAssembly.dll' DiskId='1'

      Source='MyAssembly.dll' Vital='yes' Assembly='.net' KeyPath='yes'>

  <netfx:NativeImage Id="Ngen" Priority="0"/>

</File>

 

The current behavior is that when the dll was not put in GAC due to the same version already in GAC, the ngen action didn’t happen.  I have tried adding a custom action that calls ngen.exe as below.

    <CustomAction Id="AssignNgen" Property="Ngen" Value="[%WINDIR]\Microsoft.NET\Framework\v2.0.50727\ngen.exe"></CustomAction>

    <CustomAction Id="NgenInstallDLL" Property="Ngen" ExeCommand="install &quot;[AssemblyGACPath]MyAssembly.dll&quot;"

                  Return="asyncWait" Execute="deferred" Impersonate="no"></CustomAction>

 

    <InstallExecuteSequence>

      <Custom Action="" Before="NgenInstallDLL"></Custom>

      <Custom Action="" Before="InstallFinalize"></Custom>

 

But during setup it pops up a command window showing the running of ngen.exe.  The command does work but the pop up window is not good and would confuse users.  Is there a way in WiX or MSI to suppress or hide the command window of a command line program?

 

Thanks,

Frank

 

 

From: Bob Arnson [mailto:[EMAIL PROTECTED]
Sent: Monday, October 09, 2006 8:20 PM
To: Frank Tse
Cc: 'Mike Dimmick'; 'Wilson, Phil'; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] how to enforce assembly to be gac'd even when thereisalready a copy in the gac

 

Frank Tse wrote:


I am wondering if setup should fail in the first place when it cannot put the DLL in GAC.  i.e. Netfx extension that puts DLL in GAC should fail when it cannot put DLL in GAC.


MSI installs assemblies to the GAC by handing it off to the Fusion engine. Fusion undoubtedly relies on the strong name to be accurate. There doesn't appear to be any way to force Fusion to re-GAC an assembly it thinks is already in there.



-- 
 
sig://boB
 
http://bobs.org




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to