wix 依赖.net client 4

修改.wixproj的文件

<BootstrapperFile Include=".NETFramework,Version=v4.0,Profile=Client">
      <ProductName>.NET Framework 4.0 Client</ProductName>
</BootstrapperFile>

<Target Name="AfterBuild">
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" 
       ApplicationName="Intuitive Query Excel Addin" 
       BootstrapperItems="@(BootstrapperFile)" 
       ComponentsLocation="Relative" 
       Copycomponents="True" 
       OutputPath="$(OutputPath)" 
       Path="$(BootstrapperPath)" />
</Target>

这里有个问题,它会自动安装简体中文包dotNetFx40LP_Client_x86_x64zh-Hans.exe,如果不想要这个包,我们可以做一点修改,找到这个路径下的这个文件

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40Client\zh-Hans\packages.xml
把它改成这个样子,就能够去除中文包了
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" Name="displayName" Culture="Culture" LicenseAgreement="eula.rtf">
  <!-- Defines list of files to be copied on build -->
  <PackageFiles >
    <PackageFile Name="eula.rtf"/>
  </PackageFiles>

  <!-- Defines a localizable string table for error messages-->
  <Strings>
    <String Name="displayName">Microsoft .NET Framework 4 Client Profile (x86 和 x64)</String>
    <String Name="Culture">zh-Hans</String>
    <String Name="Adminrequired">必须具有管理员权限,才能安装 .NET Framework 4 Client。请与管理员联系。</String>
    <String Name="InvalidplatformWinNT">安装 .NET Framework 4 Client 需要 Windows XP SP2、Windows 2003 SP1、Windows Vista 或更高版本。请与应用程序供应商联系。</String>
    <String Name="Invalidplatformarchitecture">IA-64 操作系统上不支持此版本的 .NET Framework 4 Client。请与应用程序供应商联系。</String>
    <String Name="DotNetFX40ClientWebBootstrapper">http://go.microsoft.com/fwlink/?linkid=182804</String>
    <String Name="DotNetFX40ClientLanguagePackBootstrapper">http://go.microsoft.com/fwlink/?linkid=164196&clcid=0x804</String>
    <String Name="GeneralFailure">尝试安装 .NET Framework 4 Client 时出错。</String>
  </Strings>
</Package>

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...