What to build
Resolve-ModuleVersionString currently returns [System.Version] on PS5.1 and [System.Management.Automation.SemanticVersion] on PS6+. The tests assert Should -BeOfType [System.Management.Automation.SemanticVersion] unconditionally, so they fail on PS5.1.
The right fix is to add a PS5.1-compatible SemanticVersion shim — a minimal class defined via Add-Type, loaded only when [System.Management.Automation.SemanticVersion] is not already available. Resolve-ModuleVersionString should use this shim on PS5.1 instead of falling back to [System.Version], so callers and tests receive the same type on both editions without any version-guard branching.
Acceptance criteria
Blocked by
None - can start immediately
What to build
Resolve-ModuleVersionStringcurrently returns[System.Version]on PS5.1 and[System.Management.Automation.SemanticVersion]on PS6+. The tests assertShould -BeOfType [System.Management.Automation.SemanticVersion]unconditionally, so they fail on PS5.1.The right fix is to add a PS5.1-compatible
SemanticVersionshim — a minimal class defined viaAdd-Type, loaded only when[System.Management.Automation.SemanticVersion]is not already available.Resolve-ModuleVersionStringshould use this shim on PS5.1 instead of falling back to[System.Version], so callers and tests receive the same type on both editions without any version-guard branching.Acceptance criteria
SemanticVersionshim is defined and loaded when running on PS5.1Resolve-ModuleVersionStringreturns the shim type on PS5.1 and the native type on PS6+Resolve-ModuleVersionStringtests pass unmodified on PS5.1 and PS7Blocked by
None - can start immediately