<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>原文链接:https://www.f2er.com/javaschema/284719.html