Find-PSResource IncludeDependencies incorrectly parses VersionRange

オープン
#1,970 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

@anamnavi がすでに取り組んでいます。

2026年8月6日 から。

評価

この issue はまだ評価されていません。

説明

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
主要言語
C#
スター
576
フォーク
114
平均マージ
23時間 17分
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/PSResourceGet のほかの issue

PowerShell/PSResourceGet の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。