Search code examples
powershellcommand-linepaket

How to use paket from command line


I installed paket from nuget in Nuget Package Manager Console with:

Install-Package paket

I then tried to run paket convert-from-nuget. It stalled out on a user prompt (it wouldn't let me type into the package manager console). My next thought was to run it from command line, but how to do so is not documented.

Just putting paket convert-from-nuget into a standard dev command prompt results in an error saying "paket" is not recognized.

How do I run paket from the command line or powershell, and how do you specify which solution to work against?


Solution

  • The way to setup paket in your repository is as follow:

    1 Download a release of paket.bootstrapper.exe

    This is a lightweight utility which obtains and updates paket.exe, pick stable release from official release page:

    https://github.com/fsprojects/Paket/releases

    2 create a .paket folder

    md .paket
    

    3 put the downloaded bootstrapper in this folder and invoke it

    cd .paket
    paket.bootstrapper
    

    now you have an up-to-date paket.exe ready to ease your handling of dependencies.

    4 convert from nuget

    cd ..
    .paket\paket convert-from-nuget
    

    Please checkout the https://github.com/fsprojects/Paket.VisualStudio also for Visual Studio plugin to help you authoring paket.dependencies and paket.references file

    Please also join https://gitter.im/fsprojects/Paket if you have any questions.