WIX 项目在 X64 平台上构建失败 [英] WIX project fails building in X64 platform

查看:35
本文介绍了WIX 项目在 X64 平台上构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中包含一个可构建 MSI 的 Windows 安装的 XML 项目.该源代码在 32 位平台计算机上运行良好,您可以在其中轻松构建解决方案.但是当尝试在 64 位平台计算机上构建源代码时,WIX 项目中出现错误.以下是错误.

I have a project that includes a windows installed XML project that builds an MSI. This source works fine in 32 bit platform computers where you can build the solution easily. But when trying to build the source in 64 bit platform computers an error occurs in WIX project. Following is the error.

是什么让 WIX 项目抛出这个错误?WIX 支持 64 位 MSI 创建吗?(我使用的是 Visual Studio 2012)

What makes WIX project throw this error ? Do WIX support 64 bit MSI creation ? ( I'm using Visual Studio 2012 )

推荐答案

WiX 支持创建 64 位 MSI,但是如果您使用由 WiX 工具集创建的 WiX 项目,则必须更改 WiX 的 csproj 文件.普通项目可以让您打开属性并设置平台,而 WiX 项目则不允许,无论如何都通过 GUI.

WiX supports creating a 64 bit MSI, however you have to alter the csproj file for WiX if you are using the WiX projects created by the WiX toolset. Where normal projects would let you open properties and set the Platform, the WiX projects do not, through the GUI anyways.

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

Below will allow the project to compile in x64 (I don't support x86, so I don't setup both).

<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>

这篇关于WIX 项目在 X64 平台上构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆