Skip to content

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Jul 23, 2025

#62430

Migrate the hosting bundle & runtime bundle to Wix5. Also update Bundle UI to meet new standards

@github-actions github-actions bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 23, 2025
@wtgodbe
Copy link
Member Author

wtgodbe commented Jul 23, 2025

First test build, since we want to test signing too: https://dev.azure.com/dnceng/internal/_build/results?buildId=2756469&view=results

@wtgodbe
Copy link
Member Author

wtgodbe commented Jul 23, 2025

##[error]C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(43,3): error MSB4011: "D:\a_work\1\s.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25372.103\tools\BeforeCommonTargets.targets" cannot be imported again. It was already imported at "D:\a_work\1\s.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25372.103\Sdk\Sdk.targets (13,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\a_work\1\s\src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj]

This is because Arcade's sdk.targets imports that file: https://github.com/dotnet/arcade/blob/2586309f3f8553152e2d1d54612e9199975f9cd4/src/Microsoft.DotNet.Arcade.Sdk/sdk/Sdk.targets#L13

And so does Microsoft.Common.CurrentVersion.targets:

<Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/>

due to: https://github.com/dotnet/arcade/blob/2586309f3f8553152e2d1d54612e9199975f9cd4/src/Microsoft.DotNet.Arcade.Sdk/tools/Settings.props#L7

This makes me think that typically Microsoft.Common.CurrentVersion.targets would come before sdk.targets in the preprocessed file, but in this case it's the other way around. We're doing a bunch of weird custom import stuff here so that's not terribly surprising. Investigating

@wtgodbe
Copy link
Member Author

wtgodbe commented Jul 24, 2025

I see, the Wix sdk.targets imports Microsoft.Common.targets now:

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />

Which causes Microsoft.Common.CurrentVersion.targets to get imported, which causes the double-import of BeforeCommonTargets.targets from Arcade. @NikolaMilosavljevic @joeloff did either of you guys run into this?

@joeloff
Copy link
Member

joeloff commented Jul 24, 2025

I see, the Wix sdk.targets imports Microsoft.Common.targets now:

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />

Which causes Microsoft.Common.CurrentVersion.targets to get imported, which causes the double-import of BeforeCommonTargets.targets from Arcade. @NikolaMilosavljevic @joeloff did either of you guys run into this?

Nope, didn't run into that for the SDK

@NikolaMilosavljevic
Copy link
Member

@wtgodbe would it be possible to incorporate wixpack work into this PR? It would help uncover any issues with wixpacks and CreateWixBuildWixpack task that is needed for resign/repack functionality.

Essentially, you'd want the same target that SDK has: https://github.com/dotnet/sdk/blob/1b4646d2244ffa462e59f10bc752f2ff6f94b569/src/Layout/pkg/windows/Directory.Build.targets#L46-L68 CoreCompile is a Wix5 target - running the new task after that target ensures that we have all the wix properties set.

Value="W3SVC"
After="IISCoreWebEngineInstalledSearch_x86"
Result="value" />
<util:RegistrySearch Id="IISW3SVCInstalledSearch_x86" Variable="IISW3SVCInstalled_x86" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp\Components" Value="W3SVC" After="IISCoreWebEngineInstalledSearch_x86" Result="value" />
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we still support any OS versions where x86 is available. Something to consider cleaning up at some point.

@wtgodbe wtgodbe merged commit f292245 into main Sep 17, 2025
30 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/Wix5 branch September 17, 2025 22:38
@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 17, 2025

/backport to release/10.0

Copy link
Contributor

Started backporting to release/10.0: https://github.com/dotnet/aspnetcore/actions/runs/17812494554

Copy link
Contributor

@wtgodbe backporting to "release/10.0" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Initial commit for wix5 update
Applying: Syntax error
Applying: Update wixproj's
Applying: Acquire wix sdk
Using index info to reconstruct a base tree...
M	global.json
Falling back to patching base and 3-way merge...
Auto-merging global.json
Applying: Fix d.b.p/t
Applying: More ordering stuff
Using index info to reconstruct a base tree...
M	eng/targets/Wix.Common.targets
Falling back to patching base and 3-way merge...
Auto-merging eng/targets/Wix.Common.targets
CONFLICT (content): Merge conflict in eng/targets/Wix.Common.targets
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0006 More ordering stuff
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Sep 17, 2025
@wtgodbe wtgodbe mentioned this pull request Sep 17, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address installer component keypath and perform comprehensive setup test pass for RC2 [WiX 5] Migrate ASP.NET Core, ANCM installers
4 participants