paket config add-credentials <url> --username <name> --password <password> --verify
paket add <PackageId> --project .\src\App\App.csproj
This will add the package to the paket.references
for the project (paket.references
should in the same directory as the project file), add the package to paket.dependencies
and update paket.lock
with the transitive dependencies for the package.
File | Notes |
---|---|
paket.lock | This file defines the full dependency graph for all of your dependencies. It's created/modified when running paket install or paket update . This file lives at the root of your project. There is only 1 paket.lock file. |
paket.dependencies | This file defines the direct dependencies for your project. You can specify dependencies in groups, and have different sources per group. Sources can be nuget feeds, github gists, or direct http dependencies. There is only 1 paket.dependencies file. Package versions can be specified here. |
paket.references | This file defines the depencies for an MSBuild project (.xxproj ). It is similar to the old school packages.config or the "new" <ProjectReference /> tags in SDK based projects. There can be any number of these files underneath paket.dependencies. You DO NOT specify versions in this file. |
.paket
|__paket.exe
|__Paket.Restore.targets
paket.lock
paket.references
|__Dir1
| |__paket.dependencies
| |__Lib.csproj
|__Dir2
|__paket.dependencies
|__App.fsproj
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<!-- dotnet restore will use Paket.Restore.targets file to build out project.assets.json and other msbuild dependencies -->
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
group Server
FSharp.Core
Saturn
group Server
source https://api.nuget.org/v3/index.json
nuget FSharp.Core
nuget Saturn
nuget Fable.JsonConverter
Command | Modifies paket.lock | Notes |
---|---|---|
Install | Yes | Only if paket.dependencies has changed |
Update | Yes | Deletes paket.lock, gets latest version of packages in paket.dependencies, rebuilds paket.lock |
Restore | No | Downloads dependencies as defined in paket.lock |