2016-08-09 46 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>