Reduce dependency preflight noise and fix WiX v6 detection#742
Reduce dependency preflight noise and fix WiX v6 detection#742johnml1135 wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Reduces default verbosity of dependency preflight output, removes the legacy NuGet CLI check, and improves WiX v6 detection for SDK-style installer projects.
Changes:
- Adds
-Detailedand-PassThruto control verbosity and scripted output. - Removes the legacy NuGet CLI dependency check from preflight.
- Updates WiX v6 detection to recognize
Project Sdk="WixToolset.Sdk/..."(and PackageReference) patterns.
| [switch]$IncludeOptional, | ||
| [switch]$Detailed, | ||
| [switch]$PassThru |
There was a problem hiding this comment.
The script adds new public parameters (-Detailed, -PassThru) but the comment-based help block at the top doesn’t appear to document them. Add .PARAMETER Detailed and .PARAMETER PassThru sections (and update any related synopsis/description) so Get-Help Verify-FwDependencies.ps1 -Full accurately reflects the new behavior.
|
|
||
| $wixProjText = Get-Content -LiteralPath $wixProj -Raw | ||
| if ($wixProjText -match "WixToolset\\.Sdk") { | ||
| [xml]$wixProjXml = Get-Content -LiteralPath $wixProj |
There was a problem hiding this comment.
When casting file content to [xml], using Get-Content without -Raw returns an array of lines, which can be implicitly re-joined and is more error-prone than reading the file as a single string. Prefer Get-Content -Raw -LiteralPath $wixProj before the [xml] cast to make XML parsing behavior deterministic.
| [xml]$wixProjXml = Get-Content -LiteralPath $wixProj | |
| [xml]$wixProjXml = Get-Content -Raw -LiteralPath $wixProj |
| } | ||
| } | ||
| return @{ Name = $Name; Found = $true; Info = $result } | ||
| return @{ Name = $Name; Found = $true; Required = ($Required -eq "Required"); Info = $result } |
There was a problem hiding this comment.
The result object now uses a boolean property named Required, which can be confused with the -Required parameter (which appears to be a string like Required/Optional). Consider renaming the result property to something explicitly boolean (e.g., IsRequired) and updating the summary filters accordingly to reduce ambiguity.
papeh
left a comment
There was a problem hiding this comment.
Documentation for the new params would be good; otherwise, looks good.
Summary
-PassThrufor scripted callers)Validation
./Build/Agent/Verify-FwDependencies.ps1./Build/Agent/Verify-FwDependencies.ps1 -IncludeOptional./Build/Agent/Verify-FwDependencies.ps1 -IncludeOptional -DetailedNotes
-Detailed.This change is