以下是如何引导.NET框架。
1)确保你的生成机器上有.NET 3.5和Windows Installer 3.1增强器。他们应该与VS一起安装。他们可能在这里找到:C:\ Program Files文件(x86)\ Microsoft SDKs \ Windows \ v6.0A \ Bootstrapper \ Packages \ DotNetFX35。
2)编辑wix项目文件。 - 右键单击该项目,选择卸载 - 再次右键单击,然后编辑wixproj
3)增加以下项目组:
<ItemGroup>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1">
<ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
4)添加在下面项目文件结尾
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="My Application Name" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="Relative" CopyComponents="True" OutputPath="$(OutputPath)" Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" /></Target>
5)现在建立。由此产生的setup.exe & msi应该安装该框架。
斯科特
这就是一个逻辑重复:http://stackoverflow.com/questions/2335287/what-is-the-best-practise-to-create-msi-with-some-other-子ms-as-prerequisite – 2011-01-21 12:49:29
我必须使用上述步骤代替第三方产品,如dotNetInstaller等。 – Dmitrii 2011-01-21 13:01:33