Skip to content

Wixpack task updates#16043

Merged
NikolaMilosavljevic merged 2 commits intodotnet:mainfrom
NikolaMilosavljevic:wixpack.update
Aug 13, 2025
Merged

Wixpack task updates#16043
NikolaMilosavljevic merged 2 commits intodotnet:mainfrom
NikolaMilosavljevic:wixpack.update

Conversation

@NikolaMilosavljevic
Copy link
Copy Markdown
Member

This addresses issues uncovered in dotnet/aspnetcore#62885

Most important change is additional support for collection of content that is applicable for installer scenario, based on preprocessor conditions. This ensures that we collect the correct files and properly evaluate all properties, define-constants and variables.

Changes

  • Simple preprocessor for most common preprocessor tokens/elements, like if, ifdef, ifndef, else and elseif
  • Ingestion of variables from all include files and Wix source files
  • Support for Binary elements, used for custom action content
  • Support for BindPaths and LocalizationFiles

Validation:

Tested all current SDK installers and 3 of the ASP.NET installers that are building at the moment.

Notes for developers

To support BindPaths and LocalizationFiles, via optional task parameters, add the following parameters to your task invocation:

        LocalizationFiles="@(_WixLocalizationFile)"
        BindPaths="@(BindPath)"

Copy link
Copy Markdown
Member

@joeloff joeloff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is anyone using $(env.) or $(sys.)? I assume we can just add them later if it comes up.

wtgodbe
wtgodbe previously approved these changes Aug 13, 2025
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than maybe we should pull the preprocessor stuff out into a different file? Wouldn't block on that though.

To @joeloff's question, I know at least aspnetcore does not use $(env.) or $(sys.)

@NikolaMilosavljevic
Copy link
Copy Markdown
Member Author

LGTM. Is anyone using $(env.) or $(sys.)? I assume we can just add them later if it comes up.

Yeah, this case is interesting:

<?define Platform = "$(sys.BUILDARCH)" ?>

  <?define Platform   =   "$(sys.BUILDARCH)" ?>

What should sys.BUILDARCH evaluate to?

Platform should already be set in DefineConstants, as I see it in aspnetcore and sdk builds, so this is likely not needed.

@NikolaMilosavljevic
Copy link
Copy Markdown
Member Author

LGTM, other than maybe we should pull the preprocessor stuff out into a different file? Wouldn't block on that though.

To @joeloff's question, I know at least aspnetcore does not use $(env.) or $(sys.)

At first I considered moving preprocessor code to a different file. But, it later became intertwined with the task as it needs to call some of the methods, i.e. to ingest variables.

@NikolaMilosavljevic
Copy link
Copy Markdown
Member Author

LGTM. Is anyone using $(env.) or $(sys.)? I assume we can just add them later if it comes up.

Yeah, this case is interesting:

<?define Platform = "$(sys.BUILDARCH)" ?>

  <?define Platform   =   "$(sys.BUILDARCH)" ?>

What should sys.BUILDARCH evaluate to?

Platform should already be set in DefineConstants, as I see it in aspnetcore and sdk builds, so this is likely not needed.

So, this seems to be set by Wix toolset to the value of InstallerPlatform, which is already defined in DefineConstants. I can add this rather easily.

@NikolaMilosavljevic
Copy link
Copy Markdown
Member Author

I've added support for known system variables that are used in .NET authoring - 18f3f76

We can add more later, but this is enough for all .NET installers at the moment.

@joeloff @wtgodbe

@NikolaMilosavljevic NikolaMilosavljevic merged commit ea9e51a into dotnet:main Aug 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants