Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Find-PSResource IncludeDependencies incorrectly parses VersionRange

Đang mở
#1,970 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@anamnavi đang làm issue này rồi.

Từ ngày 6/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.
Steps to reproduce

Package is published with nuspec specifying

<dependencies>
  <dependency id="MyPackage" version="1.0.0" />
</dependencies>

Find-PSResource incorrectly sets the maximum version as 1.0.0 too, resulting in Save-PSResource not finding "MyPackage" with version 2.0.0.

This goes against MSFT documentation https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges

Find-Module and Save-Module work correctly.

Tested with Azure and locally hosted https://learn.microsoft.com/en-us/nuget/hosting-packages/nuget-server

(Find-PSResource -Name MyPackage -Repository LocalPSRepo -IncludeDependencies).Dependencies.VersionRange

Expected behavior
IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             :  // Maybe this shouldn't exist at all
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : False
IsMaxInclusive         : False //Not sure on this
HasLowerAndUpperBounds : True
Float                  :
OriginalString         : 1.0.0
Actual behavior
IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             : 1.0.0
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : True
IsMaxInclusive         : True
HasLowerAndUpperBounds : True
Float                  :
OriginalString         : 1.0.0
Environment data
ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.2.0                 Microsoft.PowerShell.PSResourceGet  {Compress-PSRes…


Name                           Value
----                           -----
PSVersion                      7.6.0
PSEdition                      Core
GitCommitId                    7.6.0
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Ngôn ngữ chính
C#
Star
577
Fork
114
Merge trung bình
23 giờ 17 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSResourceGet

Tất cả issue của PowerShell/PSResourceGet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.