[英]Unable to compile vdproj with devenv - 'targeting 'x64' is not compatible with the project's target platform 'x86''
[英]WiX x64 platform target
當我創建一個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.
它聲稱沒有為項目設置輸出路徑,但當然有。 輸出路徑設置為bin\\x64\\Debug\\
用於調試配置, bin\\x64\\Release\\
用於發布配置。 那么錯誤是什么?
此外,錯誤不會顯示在“錯誤”窗口中。 現在,我知道責怪編譯器是一個新手錯誤,但我開始懷疑......這是一個構建工具錯誤,還是我錯過了一些愚蠢的東西?
如果您在文本編輯器中打開 .wixproj 文件,您將看到您的 x64 配置項位於文件底部(在標准 WiX 構建目標的導入下方),而您的 x86 配置位於頂部(在導入上方) )。 如果您將 x64 配置的 XML 轉換為與 x86 配置相鄰,那么您會發現您的項目可以為兩個平台正確構建。
我遇到過同樣的問題。 但是,就我而言,wixproj 文件格式不正確,但是
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
完全失蹤了。 剛剛復制了 x86 配置,保存,一切都很好。
首先確保您使用的是最新版本的 WiX 工具集(v3.5 或當前的 v3.6 drop)。 如果這仍然在那里重現,那聽起來像是一個錯誤。 請在此處提交:http ://sourceforge.net/tracker/?group_id=105970&atid=642714
警告:WiX 可以在不同的 <PropertyGroup> 中插入多個 this 實例:
<DefineConstants>Foo=Bar</DefineConstants>
<DefineConstants>Foo=</DefineConstants>
從而覆蓋您想要的設置。 您需要手動仔細編輯 .WIXPROJ 文件並注意重復項。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.