Gate WiX 3 and WiX 5 toolset downloads behind opt-in properties#16612
Gate WiX 3 and WiX 5 toolset downloads behind opt-in properties#16612
Conversation
Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>
|
@copilot when should this true by default? where ele is Wix opted in? |
Neither property should ever be Who should opt in:
Where WiX is currently consumed in Arcade's infrastructure:
|
| <UsingToolVisualStudioIbcTraining Condition="'$(UsingToolVisualStudioIbcTraining)' == ''">false</UsingToolVisualStudioIbcTraining> | ||
| <UsingToolNuGetRepack Condition="'$(UsingToolNuGetRepack)' == ''">false</UsingToolNuGetRepack> | ||
| <UsingToolSymbolUploader Condition="'$(UsingToolSymbolUploader)' == ''">false</UsingToolSymbolUploader> | ||
| <!-- Set UsingToolWix3 to true if this repo produces WiX 3 MSI installers (wixpacks). --> |
There was a problem hiding this comment.
Defautling to false will be a breaking change for downstream repos. I'd default to true
| <!-- Set UsingToolWix3 to true if this repo produces WiX 3 MSI installers (wixpacks). --> | ||
| <UsingToolWix3 Condition="'$(UsingToolWix3)' == ''">false</UsingToolWix3> | ||
| <!-- Set UsingToolWix5 to true if this repo produces WiX 5 MSI installers (wixpacks). --> | ||
| <UsingToolWix5 Condition="'$(UsingToolWix5)' == ''">false</UsingToolWix5> |
There was a problem hiding this comment.
If I understand our upgrade path correct, UsingToolWix5 will be incorrectly named when we update to 6 or 7. Instead, maybe UsingToolWix5Plus?
mmitche
left a comment
There was a problem hiding this comment.
I think in general this looks okay but needs tweaks around the defaults OR we need to identifyt all the places that need to get the property and update before we check in. Most of the time this wouldn't break a repo until it ran its official build.
Every repo using Arcade SDK 10 was unconditionally downloading both
Microsoft.Signed.Wix(WiX 3) andMicrosoft.WixToolset.Sdk(WiX 5) toolsets — including repos that produce no MSI/WiX installers — causing unnecessary ~100MB+ restores and signing failures when WiX feeds are unavailable.Changes
DefaultVersions.props— Added two new opt-in properties (defaultfalse), following theUsingToolVSSDKpattern:Tools.proj— Gated bothPackageDownloadentries behind their respective opt-in:Sign.proj— GatedMicrosoft.Signed.Wix.propsimport and conditionally sets_Wix3ToolsPath/_WixToolsPathonly when the respective tool is opted in; passes those toSignToolTaskinstead of unconditional property expansions.SignToolTask.cs/BatchSignUtil.cs— Changed WiX path guards from!= null/== nullto!string.IsNullOrEmpty()to correctly handle MSBuild's empty-string expansion of unset properties.Repos producing WiX installers must now set
<UsingToolWix3>true</UsingToolWix3>and/or<UsingToolWix5>true</UsingToolWix5>ineng/Versions.props.To double check:
Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.