Skip to content

[WiX 5] Migrate SDK from v3 to v5 #48699

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

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open

[WiX 5] Migrate SDK from v3 to v5 #48699

wants to merge 53 commits into from

Conversation

joeloff
Copy link
Member

@joeloff joeloff commented Apr 24, 2025

Overview

This PR migrates the .NET SDK from WiX 3.14 to using 5.0.2. The package used is different from the public toolset and built from source.

Changes

  • Add separate SDK style projects for each installer: CLI, templates, and Visual Studio placeholder and standalone bundle.
  • Add .wixproj files as ProjectReferences to dotnet-sdk.proj and assign an Idle target. This allows the projects to participate in restore operations, but avoids being built as an actual reference. The projects depend on various values that are unavailable when project references are resolved.
  • Convert .wxl files to the v4 schema
  • Delete all the generate*.ps1 scripts that previously invoked Candle and Light. These tools no longer exist in v5.
  • Generate a PackageGroup for MSIs to chain into the SDK bundle. This avoids repeating the same authoring and simplifies adding additional MSI packages in the future (assuming they follow the same pattern).
  • Bundles will now match the target architecture. In v3, bundles were always 32-bit applications. This should be documented as a potential breaking change since detection logic will need to search under both registry views.

UI changes

  • Bundle theme file updated to use system colors. These colors automatically adjust when using high contrast display themes.
  • Replace old msi.ico with .NET icon.
  • Page authoring updated with conditional text based off WixBundleAction.
  • Fix tab order for Hypertext elements. Only one link per control to ensure tab order is consistent.
  • Cleaned up alignment.
  • Renamed font IDs.
  • Cleaned up the help page and added instructions for using lang option.
  • Added text for the Modify page.

Finalizer

  • The finalizer has been updated to consume the WixBundleAction variable (See the ExePackage authoring for more details).
  • For installs, the ExePackage is detected as installed and planning will skip executing it (Execute is set to None)
[1560:1F64][2025-06-19T13:06:30]i201: Planned package: Finalizer, state: Present, 
default requested: Present, ba requested: Present, execute: None, 
rollback: None, default cache strategy: Keep, ba requested strategy: Keep, cache: Vital, uncache: No, dependency: None, expected install registration state: Present, expected cache registration state: Present
  • Repairs will detect it as installed, but the finalizer will exit early
[0CCC:0001][2025-06-19T13:08:47] Finalizer: logPath: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\Microsoft_.NET_SDK_10.0.100-dev_(x64)_20250619130825_000_Finalizer.log
[0CCC:0001][2025-06-19T13:08:47] Finalizer: sdkVersion: 10.0.100-dev
[0CCC:0001][2025-06-19T13:08:47] Finalizer: platform: x64
[0CCC:0001][2025-06-19T13:08:47] Finalizer: bundleAction: 8
  • Uninstall will always execute it.

@joeloff joeloff changed the title [WiX 5] Migrate SDK from v3 to V5 [WiX 5] Migrate SDK from v3 to v5 May 23, 2025
@joeloff joeloff marked this pull request as ready for review July 21, 2025 15:41
@Copilot Copilot AI review requested due to automatic review settings July 21, 2025 15:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the .NET SDK installer from WiX 3.14 to WiX 5.0.2, modernizing the build process and improving maintainability. The migration involves replacing PowerShell-based build scripts with modern WiX SDK projects and updating XML schemas to the v5 format.

Key Changes

  • Replaced PowerShell scripts (generatemsi.ps1, generatebundle.ps1, etc.) with WiX SDK-style project files
  • Migrated XML namespace from v3 schema (http://schemas.microsoft.com/wix/2006/wi) to v5 schema (http://wixtoolset.org/schemas/v4/wxs)
  • Consolidated MSI authoring using shared components and modern WiX SDK build targets

Reviewed Changes

Copilot reviewed 67 out of 72 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Layout/redist/targets/GenerateMSIs.targets Updated build targets to use MSBuild instead of PowerShell scripts
src/Layout/pkg/windows/**/*.wxs Converted WiX source files from v3 to v5 schema
src/Layout/pkg/windows/msis/**/*.wixproj New WiX SDK projects for MSI generation
src/Layout/pkg/windows/bundles/sdk/**/* New bundle project and theme files for installer UI
src/Layout/pkg/windows/generate*.ps1 Removed legacy PowerShell build scripts
Comments suppressed due to low confidence (1)

src/Layout/pkg/windows/bundles/sdk/LCID/1042/bundle.wxl:56

  • Inconsistent variable naming: '[DOTNETHOME_x64]' uses lowercase 'x64' while '[DOTNETHOME_X86]' uses uppercase 'X86'. This should be consistent across all variables.
  <String Id="InstallPathx64x86" Value="x64 SDK 설치의 설치 경로: &quot; [DOTNETHOME_x64]&quot; x86 SDK 설치의 경우와 같을 수 없습니다. &quot; [DOTNETHOME_X86]&quot;" />

joeloff and others added 2 commits July 21, 2025 08:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants