Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize nuget version on FindPackageVersion #3759

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lktraser
Copy link
Contributor

@lktraser lktraser commented Nov 13, 2024

#3590

fixing FindPackageVersion for runtime packages with versions with trailing 0 in build or revision.

@lktraser lktraser requested a review from a team as a code owner November 13, 2024 13:16
@@ -277,7 +277,7 @@ class NuGetFeed {
if ($excludeVersions -contains $version) {
continue
}
if (($select -eq 'Exact' -and [NuGetFeed]::NormalizeVersionStr($nuGetVersionRange) -eq [NuGetFeed]::NormalizeVersionStr($version)) -or ($select -ne 'Exact' -and [NuGetFeed]::IsVersionIncludedInRange($version, $nuGetVersionRange))) {
if (($select -eq 'Exact' -and [NuGetFeed]::NormalizeVersionStr($nuGetVersionRange) -eq [NuGetFeed]::NormalizeVersionStr($version)) -or ($select -ne 'Exact' -and [NuGetFeed]::IsVersionIncludedInRange([NuGetFeed]::NormalizeVersionStr($version), [NuGetFeed]::NormalizeVersionStr($nuGetVersionRange)))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you can use the NormalizeVersionStr on the version range, which can be "[24.4.0.0)" - or?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking in the IsVersionIncludedInRange function - that one already uses NormalizeVersionStr on the individual version numbers found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants