Skip to content
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

Dialog images not shown in Wix4 with UI=WixUI_Common unless UIRef Id=WixUI_Common is added #1681

Open
lab2k1 opened this issue Dec 1, 2024 · 2 comments

Comments

@lab2k1
Copy link

lab2k1 commented Dec 1, 2024

As per the title, a bare-bones project using project.UI = WUI.WixUI_Common will display neither the background nor the banner image in the native dialogs. It does not matter if using the default ones, or custom ones set in project.BackgroundImage, BannerImage, and it does not matter whether the custom images are made into PNG, JPEG or BMP format, they simply won't display.

The issue can be apparently resolved, and the images displayed, by either adding <UIRef Id="WixUI_Common"/> to the WXS file, or adding project.WixSourceGenerated += doc => doc.Root.Select("Package").AddElement("UIRef", "Id=WixUI_Common"); in the Wix# code.

Turns out that Wix# has a line product.AddElement("UIRef", $"Id={project.UI}"); for Wix3, but that line was dropped for Wix4. My question is what was the reason to drop it, and whether there would be any drawback in adding it back. Thank you.

@oleg-shilo
Copy link
Owner

oleg-shilo commented Dec 2, 2024

If I recall it right, the WiX4 upgrade wizard removed the UIRef tag. And indeed (I just retested) it is not required for any UI type. (e.g. project.UI = WUI.WixUI_Mondo). Tough WUI.WixUI_Common needs it when you create your custom dialogs. But until you do you cannot detect the problem since this UI has no dialogs by default. This is what you have discovered.
I think it is safe to reinstate it for WUI.WixUI_Common. Will make the change.

@lab2k1
Copy link
Author

lab2k1 commented Dec 3, 2024

Thank you, Oleg, that was quick and insightful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants