Open twest820 opened 1 year ago
In WiX v4, if you use StandardDirectory ProgramFiles6432Folder and remove bitness attributes from the package and the components it will automatically build the MSI with the bitness set by your solution/project platform. 'x64' is AMD64.
This message comes from the MSI SDK, so we can't control the message. If we implemented the ICEs as equivalent checks in Burn, we could have better wording.
@barnson, good to know. Thank you.
@chrpai, I didn't describe it in the OP but it's maybe worth mentioning the build structure behind the installer makes an error desirable. Most of the code is managed but is built to x64 as doing so produces modestly more performant MSIL and allows linking to one critical underlying native assembly that's 64 bit. So Fire Giant's WiX v3 migration choosing to update to Bitness="always64"
is accurate and it's good to have something which says hey, the WiX project's build setting in the .sln is therefore wrong.
@barnson Could/should we have a master issue pointing to issues (like this one) related to all the ICEs we'd prefer to have implemented?
All of them. We'd love to replace all of them. We could create a countdown list if someone was seriously interested in undertaking the problem.
I came across the similar error when validating a MSI package built with wix.exe instead of MSBuild.
I was trying to install the binary to "Program Files" instead of "Program Files (x86)" and setting StandardDirectory.Id=ProgramFiles64Folder
and Component.Bitness=always64
in wxs file resulted this error.
Managed to resolve it by setting StandardDirectory.Id=ProgramFiles64Folder
only and passing -arch x64
to wix build
command.
I had the same issue, solved by adding this to the .wixproj
file:
<PropertyGroup>
<InstallerPlatform>x64</InstallerPlatform>
</PropertyGroup>
Of course, also make sure you have set
<StandardDirectory Id="ProgramFiles64Folder">
and Component.Bitness=always64
Documentation is a major pain...
Funny enough, my latest Deployment Dojo episode (number 48) dug into a bitness issue as well. You might find it interesting.
Note: Component/Bitness='always64'
is not necessary when you set the architecture of your package correctly in the project (or .sln as I do in the Deployment Dojo episode).
Note:
Component/Bitness='always64'
is not necessary when you set the architecture of your package correctly in the project (or .sln as I do in the Deployment Dojo episode).
Yes, I figured this out with wix msi decompile
command, which is a really nice tool - thanks for that! :heart:
Seems like I covered that in this thread on June 21. WiX has done a great job of supporting building multple archs without changing code. About the only thing I'd add is build the Wix4UtilCA_$(sys.BUILDARCHSHORT) thing as default into the WiX Util CAs.
And, if I may say so myself, feel like I did a great job of capturing this in IsWiX's project templates. You simply use the IsWiX v4 MSI Package template to create your project and IsWiX will setup the StandardDirectory element and author components without the bitness attributes. You simply build the solution platform that you want and it just works.
Bugs
Which version of WiX are you building with? HeatWave for VS2022 1.0.1 doesn't seem to indicate WiX version it includes, in either the extension description or build output but presumably it's 4.0.1.
Which version of Visual Studio are you building with (if any)? VS2022 17.6.3
Which version of the WiX Toolset Visual Studio Extension are you building with (if any)? HeatWave for VS2022 1.0.1
Which version of .NET are you building with? 6.0
Describe the problem and the steps to reproduce it.
I'm migrating an existing installer from WiX 3.11 to WiX 4 and, after HeatWave's automated migration, the build initially failed with large numbers of
It's unclear what the Template Summary Property is. I get no relevant hits at wixtoolset.org (most of them are for the code classes and thus departed from, albeit parallel to, .wxs), most general search hits which appear possibly relevant have broken links or point to no longer available resources, it doesn't seem like this has been discussed on the WiX list, and the most relevant content on StackOverflow refers to Package@Platform, which is no longer valid. From the WiX schema and Microsoft documentation on installers it appears the Template Summary Property might be Package/SummaryInformation@Platform. However, that's not valid .wxs schema, though it seems like the WiX build process might generate such a property internally as part of creating the installer.
As best I'm able to determine, what this error is actually saying is Build -> Configuration Manager -> Platform needs to be changed from x86 (as required by WiX v3) to one of Visual Studio's 64 bit options.
It would be nice to have a user actionable error message. Perhaps something in the direction of "This package contains component 'Foo' with Bitness="always64" but the build platform is x86 rather than x64" if I'm understanding properly. It's also maybe a little odd Intel64 is mentioned here—Intel discontinued IA64 in 2020—while the ARM64 platform is not.