Skip to content

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

Closed

Description

@ero-qt

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

Activity

  1. added
    untriaged
    on May 15, 2025
  2. added
    needs-area-label
    on May 15, 2025
  3. added and removed
    needs-area-label
    on May 15, 2025
  4. dotnet-policy-service commented on May 15, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-runtime
    See info in area-owners.md if you want to be subscribed.

  5. added
    help wanted
    and removed
    untriaged
    on Jul 23, 2025
  6. added this to the Future milestone on Jul 23, 2025
  7. jeffhandley commented on Jul 23, 2025

    @jeffhandley
    Member

    Marked as help wanted [up-for-grabs] Good issue for external contributors . A fix would need to come with thorough tests, ideally improving the existing test coverage not only related to this specific behavior change, but any other potentially affected behaviors.

  8. removed
    help wanted
    on Oct 24, 2025
  9. locked and limited conversation to collaborators on Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions