New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preprocessor variable with WiX version #4821
Comments
ps. I'd be happy to create a PR for this if the idea is approved.
|
You can do this at a file level already using Wix/@RequiredVersion. We don't understand the use case, though; can you provide a concrete example? |
The particular scenario I'm looking at relates to the now deprecated Action="createAndRemoveOnUninstall" attribute. This generates a warning in more recent versions of Wix, but didn't in earlier ones. And if you build with 'warnings as errors' then that fails the build. I'd like to be able to conditionally include the original line for older versions of Wix, but switch to a newer line for more recent ones. (In my situation most machines are running the old version of Wix, and it will take some organising to upgrade them all, but for testing out VS2015, my own machine is running 3.10)
|
FYI - I had a similar problem when I moved from 3.8 to 3.9 (if I recall because there was a change to util:ProductSearch). My 3.8 code as I recall failed to compile in 3.9. I was using 3.9 in my dev system but the build box needed to stay at 3.8 for a period of time. To address this I used MSBuild to detect the version of WiX and set a MSBuild property which I used with:
|
I can see it being useful if you have BA extensions or customisations as it would allow the correct one to be loaded based on which version of WiX is installed. For example, I would like to trial 3.10 and an updated ExtBA but my build machine is still 3.9.
|
OK, sounds reasonable. We've added new warnings but everything else is compatible. |
I have some WiX projects that I'd like to be able to use on multiple machines which each may have a different version of WiX 3.x installed.
It would be nice to be able to conditionally include/exclude code depending on which version of the WiX toolset is currently executing.
Here's a suggested implementation:
$(sys.WIX_VERSION)
3.10.1823.0
$(sys.WIX_MAJORVERSION)
3
$(sys.WIX_MINORVERSION)
10
$(sys.WIX_BUILDVERSION)
1823
$(sys.WIX_UPDATEVERSION)
0
The text was updated successfully, but these errors were encountered: