PowerShell / PowerShell/PSResourceGet
Find-PSResource IncludeDependencies incorrectly parses VersionRange
@anamnavi is already working on this.
Since Aug 6, 2026.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.