Closed thenextman closed 8 months ago
Hi Richard,
I also found it difficult to deal with the very static nature of WiX functionality. You are right. It is the question about WiX, so I will be guessing only.
app.config has no relevance for the situation. CAConfigFile is not involved in the detection but the initialization of MSI CLR hosting runtime.
Some of the WiX extensions is either failing to perform the detection test on Win11 or the detection algorithm is not working in that conditions. So the extension leaves NETFRAMEWORK45 incorrectly set.
You can try and see what is the value of NETFRAMEWORK45 property at runtime and it can give you some clues.
But, me personally, I had so many situations when I had to cause WiX wisdom for months for some very simple task, so I always prefer to take the matter in my hands.
I would do the check as from the CA. IE, check the presence of some files, and registry (BTW this is what WiX extensions do). and then either abort the installation or set your own property to some meaningful value.
YOu can even set that NETFRAMEWORK45 if WiX fails to do so. But you will need to do it as soon as before launch condition
. Project.Load
can be a good candidate for that.
Thank you @oleg-shilo, it's what I thought. Rather than mess with this anymore I will just use some custom code to detect the prerequisite. wixsharp is the best for making that so easy!
A two part question (and some of this might relate more to WiX itself than wixsharp, so my apologies if this is not the correct avenue).
And see it reflected in the wxs:
However, running the installer on my Windows 11 machine triggers the condition "You don't have net48". I definitely do: although it doesn't show up in add/remove programs, I develop and run software all day that requires net48. Just to validate, running the .NET 4.8 web installer tells me ".NET Framework 4.8 or a later update is already installed on this computer.".
So what am I doing wrong?
and setting it with
project.CAConfigFile
. But now I don't get any managed UI: the installer immediately shows the UAC prompt, which I acknowledge, but then nothing happens (the installer just goes away).Thank you!!