Skip to content

Are NuGet package names case-sensitive? #429

Closed

Description

@agross
source https://www.nuget.org/api/v2/

nuget Rx-Interfaces ~> 2.2
nuget NUnit ~> 2.6
NUGET
  remote: https://www.nuget.org/api/v2
  specs:
    NUnit (2.6.1)
    Rx-Interfaces (2.2.2)
$ paket outdated
Paket version 0.17.16.0
found: paket.dependencies
Resolving packages:
  - fetching versions for NUnit
    - exploring NUnit 2.6.3
  - fetching versions for Rx-Interfaces
    - exploring Rx-Interfaces 2.2.5
Outdated packages found:
  * NUnit 2.6.1 -> 2.6.3
  * Rx-Interfaces 2.2.2 -> 2.2.5
2 seconds - ready.

Wrong casing, nunit:

$ paket update nuget nunit
Paket version 0.17.16.0
found: paket.dependencies
Resolving packages:
    - exploring NUnit 2.6.1
    - exploring Rx-Interfaces 2.2.2
Locked version resolutions written to paket.lock
3 seconds - ready.

Correct casing, NUnit:

$ paket update nuget NUnit
Paket version 0.17.16.0
found: paket.dependencies
Resolving packages:
  - fetching versions for NUnit
    - exploring NUnit 2.6.3
    - exploring Rx-Interfaces 2.2.2
Locked version resolutions written to paket.lock
NUnit 2.6.3 unzipped to packages\NUnit
2 seconds - ready.

nuget.exe doesn't care about casing, but we apparently do:

$ nuget install nunit
Installing 'NUnit 2.6.3'.
Successfully installed 'NUnit 2.6.3'.

Activity

  1. agross commented on Dec 6, 2014

    @agross
    ContributorAuthor

    BTW, paket add nuget machine.specifications works as well. We should

    • have a consistent story regarding paket add nuget <name> and paket update nuget <name>
    • write API-reported casing to the dependencies and lock files
    $ paket add nuget machine.specifications
    Paket version 0.17.16.0
    found: paket.dependencies
    Adding machine.specifications to paket.dependencies <-- incorrect casing!
    Resolving packages:
        - exploring NUnit 2.6.3
        - exploring Rx-Interfaces 2.2.2
      - fetching versions for machine.specifications <-- incorrect casing
        - exploring machine.specifications 0.9.1 <-- again
    Locked version resolutions written to paket.lock
    Downloading Machine.Specifications 0.9.1 to NuGet\Cache\Machine.Specifications.0.9.1.nupkg
    Machine.Specifications 0.9.1 unzipped to packages\Machine.Specifications
    Dependencies files saved to paket.dependencies
    4 seconds - ready.
    diff --git a/paket.dependencies b/paket.dependencies
    index 1855c60..aa95c10 100644
    --- a/paket.dependencies
    +++ b/paket.dependencies
    @@ -1,4 +1,5 @@
    source https://www.nuget.org/api/v2
    
     nuget Rx-Interfaces ~> 2.2
     nuget NUnit ~> 2.6
    +nuget machine.specifications
  2. forki commented on Dec 6, 2014

    @forki
    Member

    Yes there are still some places where have to use the corrected version name.

  3. added a commit that references this issue on Dec 7, 2014
    392e9cf
  4. added a commit that references this issue on Dec 7, 2014
    a65a0ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions