简体   繁体   English

WiX x64 平台目标

[英]WiX x64 platform target

When I create a WiX project and try to build it with the platform set to 'x64', I get errors in my build output like this:当我创建一个WiX项目并尝试在平台设置为“x64”的情况下构建它时,我在构建输出中收到如下错误:

------ Build started: Project: MyProject, Configuration: Release x64 ------
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(444,7): error : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Release'  Platform='x64'
Done building project "MyProject.wixproj" -- FAILED.
------ Build started: Project: MyProject, Configuration: Debug x64 ------
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(444,7): error : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Debug'  Platform='x64'
Done building project "MyProject.wixproj" -- FAILED.

It claims that there's no output path set for the project, but of course, there is.它声称没有为项目设置输出路径,但当然有。 The output path is set to bin\\x64\\Debug\\ for the debug configuration and bin\\x64\\Release\\ for the release configuration.输出路径设置为bin\\x64\\Debug\\用于调试配置, bin\\x64\\Release\\用于发布配置。 So what's the error?那么错误是什么?

Also, the error doesn't show up in the Errors window.此外,错误不会显示在“错误”窗口中。 Now, I know it's a rookie mistake to blame the compiler, but I'm beginning to wonder... Is this a build tool bug, or am I missing something stupid?现在,我知道责怪编译器是一个新手错误,但我开始怀疑......这是一个构建工具错误,还是我错过了一些愚蠢的东西?

If you open your .wixproj file in a text editor, you will see that your x64 configuration items are at the bottom of the file (below the import of the standard WiX build targets) and your x86 configuration is at the top (above the import).如果您在文本编辑器中打开 .wixproj 文件,您将看到您的 x64 配置项位于文件底部(在标准 WiX 构建目标的导入下方),而您的 x86 配置位于顶部(在导入上方) )。 If you shift the XML for the x64 config so that it's adjacent to the x86 config, then you will find that your project builds properly for both platforms.如果您将 x64 配置的 XML 转换为与 x86 配置相邻,那么您会发现您的项目可以为两个平台正确构建。

I had the same issue.我遇到过同样的问题。 In my case, however, the wixproj file was not malformed, but the但是,就我而言,wixproj 文件格式不正确,但是

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">

was missing completely.完全失踪了。 Just made a copy of the x86 config, saved and all is good.刚刚复制了 x86 配置,保存,一切都很好。

First make sure you are using the latest version of the WiX toolset (v3.5 or current v3.6 drop).首先确保您使用的是最新版本的 WiX 工具集(v3.5 或当前的 v3.6 drop)。 If this still reproduces there it sounds like a bug.如果这仍然在那里重现,那听起来像是一个错误。 Please do file it here:http://sourceforge.net/tracker/?group_id=105970&atid=642714请在此处提交:http ://sourceforge.net/tracker/?group_id=105970&atid=642714

Warning: WiX can insert multiple instances of this in different <PropertyGroup>s:警告:WiX 可以在不同的 <PropertyGroup> 中插入多个 this 实例:

    <DefineConstants>Foo=Bar</DefineConstants>
    <DefineConstants>Foo=</DefineConstants>

thus overriding the settings that you want.从而覆盖您想要的设置。 You need to carefully edit the .WIXPROJ file manually and look out for duplicates.您需要手动仔细编辑 .WIXPROJ 文件并注意重复项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM