我正在为一个C ++ VC9 x64应用程序开发WiX安装程序,该应用程序依赖于Microsoft Visual C ++ 2008 SP1可再发行组件包(x64)(http://www.microsoft.com/en-us/download/details.aspx?id=2092)
为实现这一目标,我在我的WiX包中添加了以下合并模块。
<DirectoryRef Id="TARGETDIR">
<Merge Id="VCRedist" SourceFile="X\Wix\Microsoft_VC90_CRT_x86_x64.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedistAlt" SourceFile="X\Wix\Microsoft_VC90_ATL_x86_x64.msm" DiskId="1" Language="0"/>
</DirectoryRef>
<Feature Id="VCRedist" Title="Visual C++ 9.0 x64 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist"/>
<MergeRef Id="VCRedistAlt"/>
</Feature>
在日志文件中生成此内容;我在这里假设它已正确安装。
MSI (s) (18:20) [17:16:56:698]: Executing op: AssemblyPublish(Feature=VCRedist,Component={22D75DAD-658C-3109-91F7-4CB1A0729109},AssemblyType=2,,AssemblyName=Microsoft.VC90.CRT,version="9.0.30729.6161",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32",)
MsiPublishAssemblies: Application Context:Global, Assembly Name:Microsoft.VC90.CRT,version="9.0.30729.6161",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"
MSI (s) (18:20) [17:16:56:698]: Executing op: AssemblyPublish(Feature=VCRedist,Component={74C57B6B-FF6E-3825-BED2-78E14E3E0E3C},AssemblyType=2,,AssemblyName=Microsoft.VC90.ATL,version="9.0.30729.6161",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32",)
MsiPublishAssemblies: Application Context:Global, Assembly Name:Microsoft.VC90.ATL,version="9.0.30729.6161",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"
应用程序无法在我干净的Win7 x64系统上运行并抛出并排配置错误。
虽然如果我从Microsoft网站应用程序运行安装Microsoft Visual C ++ 2008 SP1可再发行组件包(x64)。我知道我错过了一些但不确定如何解决这个问题。