Skip to content

How do I add a NuGet package to the Server?

You can add NuGet packages to the server to give it more capabilities. You can download a wide variety of packages from the official NuGet site.

In this example we will add the FsToolkit ErrorHandling package package.

1. Add the package

Navigate to the root directory of your solution and run:

dotnet paket add FsToolkit.ErrorHandling -p Server

This will add an entry to both the solution paket.dependencies file and the Server project's paket.reference file, as well as update the lock file with the updated dependency graph.

For a detailed explanation of package management using Paket, visit the official docs.