Paket allows one to automatically manage the linking of files from HTTP resources into your projects.
You can reference a single file from a HTTP resource simply by specifying the
URL in the
1: 2: 3:
If you want to reference the file in one of your project files then add an entry
to the project's
This will reference the linked file directly into your project. By default the
linked file will be visible under
paket-files directory in project.
The build action is determined depending on the file extension:
If the file extension is equal to project type it is added as compile items. For
- If the file extension is
.dllthen it is added as reference.
- Otherwise it is added as an 'Add as link' content file.
When referencing a file using a
http dependency, there are several options
that help you to deal with things like authentication and file name. The pattern
<file>allows you to define the path to which the file that is downloaded will be written to. For example specifying the following
http http://www.fssnip.net/raw/1M/test1.fs src/test1.fs
will write the file to
<source name>allows you to override the directory which the downloaded file is written to and also acts as a key to lookup any credentials that maybe associated for that key. For example you add credentials using
paket config add-credentials MySourcethen each time Paket extracts a HTTP dependency with
<source name>the credentials will be made part of the HTTP request. If no keys exist in the credential store then the request will be made without any
file:// URIs schemes are allowed. Examples:
http https://raw.githubusercontent.com/fsprojects/Paket/master/src/Paket.Core/ProjectFile.fswill write the file to
http file:///c:/projects/library.dllwill write the file to
Using groups for HTTP-dependent files can be helpful to reduce the number of files that are reinstalled.