Paket


The paket.lock file

Consider the following paket.dependencies file:

1: 
2: 
3: 
4: 
source https://nuget.org/api/v2

nuget Castle.Windsor-log4net !~> 3.2
nuget Rx-Main !~> 2.0

Here we specify dependencies on the default NuGet feed's Castle.Windsor-log4net and Rx-Main packages; both these packages have dependencies on other NuGet packages.

The paket.lock file records the concrete dependency resolution of all direct and transitive dependencies of your project:

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
NUGET
  remote: https://nuget.org/api/v2
    Castle.Core (3.3.0)
    Castle.Core-log4net (3.3.0)
      Castle.Core (>= 3.3.0)
      log4net (1.2.10)
    Castle.LoggingFacility (3.3.0)
      Castle.Core (>= 3.3.0)
      Castle.Windsor (>= 3.3.0)
    Castle.Windsor (3.3.0)
      Castle.Core (>= 3.3.0)
    Castle.Windsor-log4net (3.3.0)
      Castle.Core-log4net (>= 3.3.0)
      Castle.LoggingFacility (>= 3.3.0)
    Rx-Core (2.2.5)
      Rx-Interfaces (>= 2.2.5)
    Rx-Interfaces (2.2.5)
    Rx-Linq (2.2.5)
      Rx-Interfaces (>= 2.2.5)
      Rx-Core (>= 2.2.5)
    Rx-Main (2.2.5)
      Rx-Interfaces (>= 2.2.5)
      Rx-Core (>= 2.2.5)
      Rx-Linq (>= 2.2.5)
      Rx-PlatformServices (>= 2.2.5)
    Rx-PlatformServices (2.2.5)
      Rx-Interfaces (>= 2.2.5)
      Rx-Core (>= 2.2.5)
    log4net (1.2.10)

If the paket.lock file is not present when paket install is run, it will be generated. Subsequent runs of paket install will only perform updates according to the latest changes in the paket.dependencies file.

Committing the paket.lock file to your version control system guarantees that other developers and/or build servers will always end up with a reliable and consistent set of packages regardless of where or when paket restore is executed.

Performing updates

If you make changes to paket.dependencies or you want Paket to check for newer versions of the direct and transitive dependencies as specified in paket.dependencies, run:

  • paket outdated to check for new versions, and report what's available.
  • paket install to analyze the modifications in the paket.dependencies file and perform a selective update (only changed dependencies are updated).
  • paket update to check for new versions, download any that fit the criteria, and update the references within the project files as specified by their associated paket.references.
Fork me on GitHub