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

System.Management.Automation.SemanticVersion should support more string constructors #1618

Closed
JamesWTruher opened this issue Aug 3, 2016 · 4 comments
Assignees
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime
Milestone

Comments

@JamesWTruher
Copy link
Member

JamesWTruher commented Aug 3, 2016

Steps to reproduce

if ( $psversiontable.psversion -gt "5.0" ) {
  "yay"
}

Expected behavior

yay

Actual behavior

Could not compare "6.0.0-alpha" to "5.0". Error: "Cannot convert value "5.0" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument
because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
At line:1 char:6
+ if ( $psversiontable.psversion -gt "5.0" ) {
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : ComparisonFailure

Environment data

PS /tmp> $psversiontable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      PowerShellCore
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.7-193-g8f60d488cb4942243d697249c6948d28c56587c7-dirty
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@SteveL-MSFT SteveL-MSFT modified the milestone: 6.0.0-Alpha.11 Aug 4, 2016
TravisEz13 pushed a commit that referenced this issue Aug 19, 2016
…1927)

* Fix for Install-Module error 'Could not compare 6.0.0-alpha to 5.0'. Added workaround fix in PowerShellGet for issue #1618

* removed the additional change related to exclusion of .nupkg and .nuspec files in Test-FileCatalog cmdlet usage
@SteveL-MSFT SteveL-MSFT added the WG-Engine core PowerShell engine, interpreter, and runtime label Sep 16, 2016
@markcowl
Copy link

Note that this currently blocks installing binary modules that require PowerShell core from being installed from the Gallery. This is a must for Azure PowerShell modules

@lzybkr lzybkr removed their assignment Mar 9, 2017
@edevil
Copy link

edevil commented Mar 9, 2017

Has there been any progress on this?

@SteveL-MSFT
Copy link
Member

Somehow we missed this during triage for beta1. I have a PR submitted.

@lzybkr lzybkr closed this as completed May 8, 2017
@lzybkr
Copy link
Member

lzybkr commented May 8, 2017

Closed via #3696

@iSazonov iSazonov added the Resolution-Fixed The issue is fixed. label May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime
Projects
None yet
Development

No branches or pull requests

6 participants