Wix4: Creating MSI launch conditions #6304
-
I'm trying to add a "Condition" element, which in v3 was a child of the product element, but doing this in v4 under the package element using wix.exe yields the error: error WIX0005: The Package element contains an unexpected child element 'Condition' Wix.exe convert doesn't edit the element, and running with -n doesn't report any errors. I've looked at the schema (https://github.com/wixtoolset/doc/blob/main/src/xsd4/wix.xsd) and saw it can be a child of a fragment, so I tried doing that instead but I get an error similar to above. The schema also still lists it as a child of Product, which doesn't seem to be used anymore in v4. Does anyone know how to create launch conditions in v4? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Wix.exe convert is supposed to work. The tests are here: https://github.com/wixtoolset/Converters/blob/7378de4301d4f8c2570b29268ca7affbdb5721c2/src/test/WixToolsetTest.Converters/ConditionFixture.cs#L179. That should show you the new way, looks like the xsd file is out of date. |
Beta Was this translation helpful? Give feedback.
Wix.exe convert is supposed to work. The tests are here: https://github.com/wixtoolset/Converters/blob/7378de4301d4f8c2570b29268ca7affbdb5721c2/src/test/WixToolsetTest.Converters/ConditionFixture.cs#L179. That should show you the new way, looks like the xsd file is out of date.