oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.12k stars 175 forks source link

Custom WPF FeaturesDialog (possibly default too) non-functional. #1637

Open smaudet opened 2 months ago

smaudet commented 2 months ago

There are multiple issues with the default FeaturesDialog code in the VS template(s).

Firstly, it will crash the installer if there are any nested features because a collection has not been initialized. Secondly, the page cannot set the description because it is not wired up. Finally, the feature tree installation set is not properly wired up - un-selecting a sub feature e.g. does not deselect the parent appropriately. There are numerous issues here.

There is also a defect where a model is misnamed as a "View" on the underlying code, which cannot be corrected by an end-user.

oleg-shilo commented 2 months ago

I will investigate your points but please be aware about this:

never the less if there is a defect, then of course it needs to be fixed. That's why I will be looking at it.

Firstly, it will crash the installer if there are any nested features because a collection has not been initialized.

There was a fix for it very recently SHA-1: 96ff60253fcad0ecf7387c22684b4d90bf873c7e. I assume you have this problem with wix4:WPF. Are you using the project template for UI? If so that template can be an old one and it may have SHA-1: 96ff60253fcad0ecf7387c22684b4d90bf873c7e change missing.

oleg-shilo commented 2 months ago

This is the investigation outcome:

  1. "...nested features because a collection..." Already fixed. Waiting for the confirmation
  2. Selected feature description is not displayed Fixed: https://github.com/oleg-shilo/wixsharp/commit/81e272830cd3bd3a30ecb47b5b30ebbbbfdf1241 Waiting for the release
  3. Consistency of the checked state of Parent-ChildNodes Fixed: https://github.com/oleg-shilo/wixsharp/commit/81e272830cd3bd3a30ecb47b5b30ebbbbfdf1241 Waiting for the release
  4. View member naming. Marked as obsolete and renamed in ViewModel Fixed: https://github.com/oleg-shilo/wixsharp/commit/81e272830cd3bd3a30ecb47b5b30ebbbbfdf1241 Waiting for the release
smaudet commented 2 months ago

@oleg-shilo I presume that yes I'm using an old template. If it's already fixed, great! I will probably not be checking this out in my test project for some time, but I wanted you to know I at least saw this.

Better to report and it is fixed than not report and it's not. My wix version is 2.1.7, I'm not sure where visual studio pulls its templates from...

oleg-shilo commented 2 months ago

Better to report and it is fixed than not report and it's not...

Of course. :)

The template that has the fix belongs to the VS extension v2.2.8:

image

I suspect your project was created with an earlier version of the template.

Anyway it looks like all the issues are resolved now. So I am planning the release this weekend.