Skip to content

Empty parameter value in FormatException thrown by Version.Parse when input has trailing . #115612

Open
@just-ero

Description

@just-ero

Description

Version.Parse(".") throws FormatException with the message The input string '' was not in a correct format.

Reproduction Steps

var v = Version.Parse(".");
var v = Version.Parse("1.");
var v = Version.Parse("1.0.");

Expected behavior

The input string '1.0.' was not in a correct format

Actual behavior

The input string '' was not in a correct format

Regression?

No response

Known Workarounds

No response

Configuration

10.0.0-preview.4.25258.110

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions