Skip to content

Floating version patterns like '1.* are treated as ranges without a max, 1.*` is [1.*, ) #5097

@anangaur

Description

@anangaur
  1. Create a NETCore/NETStandard project (PackageReference).
  2. Have it depend on a package (say NuGetPlayLib) that has versions 1.1.0,1.2.0,1.3.0,2.0.0
  3. Now edit the csproj file to make the dependency on "1.*"
    <ItemGroup> <PackageReference Include="NuGetPlayLib" Version="1.*" /> </ItemGroup>
  4. Remove the versions 1.* from the feeds
  5. Restore package dependencies for the project

Expected: It should throw an error as it would have if the dependency was specified as:
<ItemGroup> <PackageReference Include="NuGetPlayLib" Version="[1.0.0, 2.0.0)" /> </ItemGroup>
Actual: It resolves to version 2.0.0

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