Packages
A script can use NuGet packages, and DataPad resolves and restores them before a run.
Packages
A script can use NuGet packages, and DataPad resolves and restores them before a run.
Open the package manager
Open the active script’s package manager from the Packages button in the toolbar, or from the package badge in the editor header. The manager lists the packages currently attached to the script, each with its resolved version, and lets you add or remove them.
Search and add
- Open the package search (Add package).
- Type a package name. DataPad queries the NuGet registry and lists the matching packages with their descriptions.
- Pick a result. The package and its chosen version are added to the script’s package list.
- The installer resolves the script’s whole package list to its closure, cache-first, so a package already in the cache is reused.
Use a package
Add its namespace to the script’s using directives. The editor’s using list and the package list travel with the script, so saving a script saves its packages and usings together. If a package’s assemblies cannot be resolved, the run reports the real resolution error rather than failing silently.