paket pack
Create NuGet packages from paket.template files.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: |
|
If you add the --verbose
flag Paket will run in verbose mode and show detailed information.
With --log-file [path]
you can trace the logged information into a file.
Creating NuGet packages
Consider the following paket.dependencies
file file:
1: 2: 3: 4: |
|
One of your projects has a paket.references
file:
1:
|
|
When you run paket install
, your
paket.lock
file will look like this:
1: 2: 3: 4: 5: 6: |
|
When you are done programming and wish to create a NuGet package of your
project, create a paket.template
file with type project
and
run:
1:
|
|
You could also run:
1:
|
|
Depending on which command you issue, Paket creates different version
requirements of the packages you depend on in the resulting .nuspec
file of
your package:
Dependency |
Default |
With locked dependencies |
---|---|---|
|
|
|
The first command (without the --lock-dependencies
parameter) creates the
version requirements as specified in your paket.dependencies
file.
The second command takes the currently resolved versions from your
paket.lock
file and "locks" them to these specific versions.
Symbol packages
Visual Studio can be configured to download symbol/source versions of installed
packages from a symbol server, allowing the developer to use the debugger to
step into the source (see
SymbolSource). These
symbol/source packages are the same as the regular packages, but contain the
source files (under src
) and PDBs alongside the DLLs. Paket can build these
symbol/source packages, in addition to the regular packages, using the symbols
parameter:
1:
|
|
Including referenced projects
Paket automatically replaces inter-project dependencies with NuGet dependencies
if the dependency has its own paket.template
. Version constraints
for these dependencies can be controlled with the --interproject-references
parameter or the interproject-references
option in paket.template
.
In addition to this the parameter --include-referenced-projects
instructs Paket to
add project output to the package for inter-project dependencies that don't have a
paket.template
file.
- It recursively iterates referenced projects and adds their project output to the package (as long as the working directory contains the other projects).
- When combined with the symbols switch, it will also include the source code of the referenced projects. Also recursively.
- Any projects that are encountered in this search that have their own project template are ignored.
Version ranges
By default Paket uses the specified version ranges from the
paket.dependencies
file as version ranges for dependencies of the
new NuGet package. The --minimum-from-lock-file
parameter instructs Paket to
use the version from the paket.lock
file and use it as the minimum
version.
Localized packages
When using a paket.template
file with type project
any
localized satellite assemblies are included in the package created.
The following layout is used:
1: 2: 3: 4: 5: 6: |
|