2016-08-09 47 views
0

我有一个项目,其中包含一个安装了Windows的XML项目,该项目构建了一个MSI。此源在32位平台计算机上正常工作,您可以轻松构建解决方案。但是,当试图在64位平台计算机中构建源时,WIX项目中会发生错误。以下是错误。WIX项目无法在X64平台上构建

enter image description here

是什么让WiX工程抛出这个错误? WIX是否支持64位MSI创建? (我正在使用Visual Studio 2012)

+0

这将有助于看你如何纳入您的项目输出的XML – vinayan

+0

组件这通常是我如何添加组件 ** <组件Win64中=“是” ID =“cmpB6D961D47E1BAB3E5772C1312B0C3C00” GUID =“{0000F8C2-64B5-4FF3-9CEE-000000000000}”> ** –

回答

0

WiX支持创建64位MSI,但是如果使用由WiX工具集创建的WiX项目,则必须更改用于WiX的csproj文件。如果正常的项目会让你打开属性并设置平台,那么WiX项目不会通过GUI进行。

下面将允许项目在x64中编译(我不支持x86,所以我不设置这两个)。

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
<Platform Condition=" '$(Platform)' == '' ">x64</Platform> 

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 
<OutputPath>bin\$(Configuration)\</OutputPath> 
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> 
<DefineConstants>Debug</DefineConstants> 
</PropertyGroup> 

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 
<OutputPath>bin\$(Configuration)\</OutputPath> 
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> 
</PropertyGroup>