-
My wixproj builds perfectly inside VS2022, but using MSBuild on the project falls over and reports: wix.exe : error WIX0288: The variable 'Platform' with value 'AnyCPU' was previously declared with value 'x86'. [C:\Workspace\90504_SmartCellConfigTool\Trunk\SetupSmartCellConfigTool\SetupSmartCell MY project file specifies the the platform must be x86 and configuration release viz: Configuration=Release Platform=x86 false 99.99.9999 1.2.102 C:\Workspace\90504_SmartCellConfigTool\Trunk\EMS Config Tool\bin\Release Version=$(ExtVersion);SourceFolder=$(ExtSourceFolder) .... and so on.So how does the platform get changed to AnyCPU - that is not what I want nor what I have specified. Any suggestions to resolve this please? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
MSBuild your .sln and you'll likely get the same behavior as VS. A .sln adds a lot of whacky additional context, especially if you configured it via the Build Configuration Manager in VS. Personally, I try to avoid the differences .sln add but that's more about MSBuild than WiX. |
Beta Was this translation helpful? Give feedback.
-
Still no joy here, to my mind this is a wix.exe issue that probably needs a setting to be passed to it so as to not try to build for all possibly configurations when only one is required. Here is the full trace of the problem: C:\Workspace\90504_SmartCellConfigTool\Trunk\SmartCellInstaller>msbuild -p:ExtVersion=1.2.102 SetupSmartCellConfigTool.wixproj Project "C:\Workspace\90504_SmartCellConfigTool\Trunk\SmartCellInstaller\SetupSmartCellConfigTool.wixproj" on node 1 (default targets). Clearly, wix.exe has been given a bunch of parameters trying to build everything it could possibly build, but not required. -NOTE- This is no .sln file anywhere in the folder that could possibly be affecting this. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
You are doubly defining the Platform preprocessor variable on the command line.
Look in you project file to find it. |
Beta Was this translation helpful? Give feedback.
At the end of each Deployment Dojo episode (once GitHub is introduced) the code is pushed to the Deployment Dojo BeltTest repository. You can see each episode in the history of the repo.