paket generate-load-scripts
Generate F# and C# include scripts that reference installed packages in a interactive environment like F# Interactive or ScriptCS.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: |
|
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.
Generate load scripts for all NuGet packages
It is possible to generate load scripts for all registered NuGet packages
defined in the paket.dependencies file.
1:
|
|
This will create .csx and .fsx scripts under .paket/load/net45/. Those
files can now be loaded in your scripts without having to bother with the list
and order of all dependencies for given package.
The generated load scripts will reference DLLs from the packages using #r.
Additionally, all scripts in a loadscripts directory in the package will be referenced by #load,
as will any script PackageName.fsx or PackageName.csx in the root of the package.
Notes:
-
This command only works after packages have been restored. Please run
paket restorebefore usingpaket generate-load-scriptsorpaket installif you just changed yourpaket.dependenciesfile. -
This command was called
generate-include-scriptsin Paket 3.x and used to put files underpaket-files/include-scriptsinstead of.paket/load.
Generate load scripts while installing packages
Alternatively, load scripts can be generated automatically while running the
paket install command.
To enable this feature, add the generate_load_scripts option to the
paket.dependencies file
1: 2: 3: 4: |
|
Example
Consider the following paket.dependencies file:
1: 2: 3: |
|
Now we run paket install to install the package.
Then we run paket generate-load-scripts --framework net45 to generate include
scripts.
In a .fsx script file you can now use
1: 2: 3: |
|