Wix Visual C++ Redistributables 与 Bootstrapper

标签 wix bootstrapper redistributable

大家好,谁能告诉我如何在我的 wix 安装程序的 Bootstrap 中引用 vcredist_x86.exe 文件。

我已经尝试过这个:

<ItemGroup>
<BootstrapperFile Include="vcredist_86">
  <ProductName>Microsoft Visual C++ Redistributables</ProductName>
</BootstrapperFile>
</ItemGroup>

 <Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Server Setup" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="Relative" CopyComponents="True" OutputPath="$(OutputPath)" Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\" />
 </Target>

但我的错误是:

 warning MSB3155: Item 'vcredist_86' could not be located in 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'.

我认为这一行是问题所在,但我不知道要输入的正确名称,并且在任何地方都找不到它:

<BootstrapperFile Include="vcredist_86">

最佳答案

查看 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages 并找到相应的文件夹(例如:vcredist_x86)。然后打开product.xml 文件并使用作为ProductCode 列出的任何内容。

例如:

ProductCode="Microsoft.Visual.C++.10.0.x86"

关于Wix Visual C++ Redistributables 与 Bootstrapper,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12162704/

相关文章:

.net - 在 GAC 之外的 COM+ 应用程序中注册 .NET 程序集

windows - WIX 烧录 : MSI in Chain is Not Installed

c# - Visual Studio 2019 : Cannot get rid of warning on VC++ 2015 runtime not found

visual-c++ - 是否禁止重新分发 C++ 2008 Redistributable Package?

Wix Bootstrapper 自定义失败页面消息取决于错误代码

c# - 我怎么知道exe的安装路径?

c# - Wix:在自定义操作中写入文件

wix - WiX 可以生成 MSI Bootstrap 而不是 exe 吗?

windows-installer - 在安装程序中发布 Microsoft dll 的最佳实践