Skip to content

Conversation

@PranavSenthilnathan
Copy link
Member

@PranavSenthilnathan PranavSenthilnathan commented Jun 25, 2025

  • Copy over existing WiX 3 files to WiX 5 directory
  • Update WiX acquisition to instead use NuGet packages
  • Update candle.exe and light.exe invocations to wix build
  • Update heat.exe invocation to use HarvestDirectory task

dotnet/runtime PR that will consume these changes: dotnet/runtime#117010

Contributes to dotnet/runtime#116878

<!--
Locate WiX tools.
-->
<Target Name="_AcquireWix">
Copy link
Member Author

Choose a reason for hiding this comment

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

Another option would be to add Microsoft.WixToolset.* as NuGet dependencies for this package. But this would mean v3 would also have them as dependencies.

<Variable Name="PRODUCT_NAME" Type="string" Value="$(var.ProductName)" bal:Overridable="no" />
<Variable Name="LINK_PREREQ_PAGE" Type="string" Value="https://go.microsoft.com/fwlink/?linkid=846817" bal:Overridable="no" />

<?ifdef WixThemeFile ?>
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed or used? The theme file is specified as part of BoostrapperApplication@ThemeFile

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is used for HyperlinkLicense. This file is conditionally generated based on whether there are any WixThemeVariable items

<Target Name="GenerateBundleThemeVariables" Condition="'@(WixThemeVariable)' != ''">

and ASP.NET Core seems to have them: https://github.com/dotnet/aspnetcore/blob/9e341eded50d7b08cd8d83749a4eb1978dd4cfb0/src/Framework/App.Runtime/bundle/aspnetcore-runtime-bundle.bundleproj#L42-L47

@PranavSenthilnathan PranavSenthilnathan changed the title [WIP] WiX v5 for Microsoft.DotNet.Build.Tasks.Installers WiX v5 for Microsoft.DotNet.Build.Tasks.Installers Aug 14, 2025
@NikolaMilosavljevic
Copy link
Member

Pushed the following fixes with 1d32c84

  • bundle.wxs - split condition and fixed the LCID variable to be unique and not clash with LCID defined elsewhere
  • breadcrumbstorefolder.wxs - fix for StandardDirectory
  • variables.wxi - split the condition
  • wix.targets - updated WixSrcFile with wxs produced by harversting, added InstallerPlatform variable and parameter, added the required -wx switch, fixed the DefineConstants variable names

@PranavSenthilnathan PranavSenthilnathan marked this pull request as ready for review August 18, 2025 20:08
joeloff
joeloff previously approved these changes Aug 20, 2025
@PranavSenthilnathan PranavSenthilnathan merged commit bc0dfdf into dotnet:main Aug 20, 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