且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WIX 项目在 X64 平台上构建失败

更新时间:2023-08-20 20:36:22

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>