From dd01ee0b93c0c5a714024660b3c554240ce14e57 Mon Sep 17 00:00:00 2001 From: Sean Williams <72675818+sean-r-williams@users.noreply.github.com> Date: Fri, 27 Feb 2026 20:40:28 -0800 Subject: [PATCH] `Update-PSResource`: Include local-copy prerelease string in update-scope determination --- src/code/UpdatePSResource.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/code/UpdatePSResource.cs b/src/code/UpdatePSResource.cs index 6cfc4fbbe..aa039f9c3 100644 --- a/src/code/UpdatePSResource.cs +++ b/src/code/UpdatePSResource.cs @@ -390,7 +390,8 @@ private string[] ProcessPackageNames( } // If the current package is out of range, install it with the correct version. - if (!NuGetVersion.TryParse(installedPackage.Version.ToString(), out NuGetVersion installedVersion)) + string installedVersionString = Utils.GetNormalizedVersionString(installedPackage.Version.ToString(), installedPackage.Prerelease); + if (!NuGetVersion.TryParse(installedVersionString, out NuGetVersion installedVersion)) { WriteWarning($"Cannot parse nuget version in installed package '{installedPackage.Name}'. Cannot update package."); continue;