How to use paket from command line

自古美人都是妖i 提交于 2019-12-05 02:07:54

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.

The Chocolatey package modifies the PSModulePath envivornment variable. I've observed that sometimes that modification isn't picked up until the system is restarted (or at least not until the user logs out and back in again). In the meantime, you can import the module using:

Import-Module <path-to-packages>\Paket.PowerShell\Paket.PowerShell.psd1

The packages path is usually something like C:\Chocolatey\lib. OTOH, re-reading your question, are you referring to the Nuget inside of Visual Studio? If so, that downloads from NuGet.org and that pkg puts paket.exe in $(SolutionDir)\packages\Pakget.1.18.5\tools\paket.exe. Your version number may varying.

Unfortunately the fact that PowerShell V5 introduces Install-Package (which downloads from Chocolatey by default) is going to get a little confusing vis-a-vie the NuGet Package Manager Console's Install-Package in Visual Studio.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!