Logo Paket

HTTP dependencies

Paket allows one to automatically manage the linking of files from HTTP resources into your projects.

Referencing a single file

You can reference a single file from an HTTP resource simply by specifying the URL in the paket.dependencies file:

http http://www.fssnip.net/raw/1M/test1.fs

If you run the paket install command, it will add a new section to your paket.lock file:

HTTP
  remote: http://www.fssnip.net/raw/1M/test1.fs
    test1.fs

If you want to reference the file in one of your project files then add an entry to the project's paket.references file.:

File: test1.fs

This will reference the linked file directly into your project. By default the linked file will be visible under paket-files directory in project.

Referencing a zip file

If you reference a zip file it will be unzipped relative to the downloaded zip file.

The reference

http file:///c:/projects/library.zip library/library.zip

will:

Build action conventions

The build action is determined depending on the file extension:

Options for HTTP dependencies

When referencing a file using an http dependency, there are several options that help you to deal with things like authentication and file name. The pattern expected is:

    http <url> <file> <source name>

Allowed schemes

All http://, https:// and file:// URIs schemes are allowed. Examples:

Updating HTTP dependencies

If you want to update a file you need to use the paket install command or paket update command with --force option.

Using groups for HTTP-dependent files can be helpful to reduce the number of files that are reinstalled.

Type something to start searching.