如何更改NGen在WiX MSI包中运行时显示的文本

如何更改NGen在WiX MSI包中运行时显示的文本,wix,ngen,Wix,Ngen,我们在安装过程中使用NGen来优化应用程序的启动时间 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> ... <File Id="File.$(va

我们在安装过程中使用NGen来优化应用程序的启动时间

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
  ...
  <File Id="File.$(var.ProjectName.TargetName).exe" Source="$(var.ProjectName.TargetPath)" KeyPath="yes">
    <netfx:NativeImage Id="ngen.File.$(var.ProjectName.TargetName)" Platform="$(var.NgenPlatform)" Priority="0" AppBaseDirectory="INSTALLLOCATION"/>
  </File>
  ...
</Wix>

...
...
安装生成的MSI时,与其他步骤相比,“删除备份文件”步骤花费了非常长的时间。深入研究后,我们发现NGen当时正在运行


我们如何在那里编写其他内容,比如“我们现在为您以后每次启动应用程序都节省了大量时间”

这已经作为功能请求进行了讨论。如前所述,您可以将ngen活动移到后台

另一个选项是通过替换InstallFinalize操作的操作文本来更改“删除备份文件”标签的文本:


提前加速您的申请:)

实际上有更好的方法,因为NetFx WiX扩展中有两个操作NetFXExecutentiativeImageCommitInstall(在启用回滚时调用)和NetFXExecutentiveImageInstall(在禁用回滚时调用)

<UI>
    <ProgressText Action="NetFxExecuteNativeImageInstall">Speeding up your application</ProgressText>
</UI>
<InstallExecuteSequence>
    <Custom Action="NetFxExecuteNativeImageCommitInstall" After="NetFxExecuteNativeImageUninstall">0</Custom>
    <Custom Action="NetFxExecuteNativeImageInstall" After="NetFxExecuteNativeImageCommitInstall" />
</InstallExecuteSequence>

加快你的申请
0

非常感谢!ProgressText和在某些程序集上选择性地将优先级设置为大于0是非常有用的组合。
<UI>
    <ProgressText Action="NetFxExecuteNativeImageInstall">Speeding up your application</ProgressText>
</UI>
<InstallExecuteSequence>
    <Custom Action="NetFxExecuteNativeImageCommitInstall" After="NetFxExecuteNativeImageUninstall">0</Custom>
    <Custom Action="NetFxExecuteNativeImageInstall" After="NetFxExecuteNativeImageCommitInstall" />
</InstallExecuteSequence>