我很难让一个针对.NET 4.5的WiX自定义启动程序工作。
我在我的Bundle.wxs文件中有以下这行:
<PackageGroupRef Id="NetFx45Web" />
我的BootstrapperCore.config如下所示。
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
<section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<wix.bootstrapper>
<host assemblyName="FSCustomBA" />
</wix.bootstrapper>
</configuration>
我尝试过多种变化。
例如,我还尝试了以下方法。
<host assemblyName="FSCustomBA">
<supportedFramework version="v4\Full" />
<supportedFramework version="v4\Client" />
</host>
And the following.
<host assemblyName="FSCustomBA">
<supportedFramework version="v4.5\Full" />
<supportedFramework version="v4.5\Client" />
</host>
以下是内容:
<host assemblyName="FSCustomBA">
<supportedFramework version="v4.5" />
</host>
接下来是相关内容。
<host assemblyName="FSCustomBA">
<supportedFramework version="v4.5\Full" />
</host>
And the following.
<host assemblyName="FSCustomBA">
<supportedFramework version="v4.5\Client" />
</host>
无论我尝试什么方法,在没有安装.NET 4.5的系统上运行我的安装包时,都会提示我安装.NET 4.5。一旦我按下同意并安装按钮,安装程序就会崩溃。当我再次尝试运行安装程序时,它会在显示按钮之前挂起。即使我重新启动,它也会挂起。在它再次运行之前,我需要从系统镜像中恢复我的系统。
有人能告诉我我做错了什么吗?
我正在使用WiX 3.10。
到目前为止,关于发生了什么事情,我唯一的线索是结果日志文件中的以下行。
[1A14:1778][2016-06-28T10:01:17]i000: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.
这个问题在Stack Overflow上的另一个问题中已经提到,预设引导程序应用程序安装.NET 4.5失败。该问题的一个答案建议将BootstrapperCore.config文件中supportedRuntime元素的sku值设置为答案。然而,我已经这样做了。还有其他的问题。