A package adds a feature that an ASP.NET Core project does not already have. Database access, command-line tools, and browser-facing CSS are different needs, so they use different package-management commands. Installing a package is only the first step: the project must also use what it provides. section 4.4 section 4.0
Choose the command by what the package supplies:
- For a .NET project dependency, run `dotnet add package` in the folder containing the `.csproj` file. The resulting `PackageReference` records its name and version in the project file; direct XML editing usually is not needed. section 12.3.2
- For a command-line tool, use `dotnet tool install --global`. For example, `dotnet-ef` supplies commands used to prepare and create Entity Framework Core databases; it is installed separately from the project's Entity Framework Core packages. section 7.2.1
- For files delivered to a browser, use LibMan. It can fetch CSS, JavaScript, images, and HTML from a configured provider into a project directory, conventionally `wwwroot/lib`. Reference installed CSS or JavaScript from the page. section 4.4.3 section 15.4.2
Add a .NET dependency
From the project folder, run `dotnet add package Swashbuckle.AspNetCore --version 6.4.0`. Check the `.csproj` file for a `PackageReference` with that name and version. Entity Framework Core and its SQL Server support are likewise added with `dotnet add package`; Identity support for Entity Framework Core requires another package. section 12.3.2 section 7.2.1 section 11.1.1
Add browser-facing styles
Install LibMan, run `libman init -p cdnjs` in the project folder, then run `libman install bootstrap@5.2.3 -d wwwroot/lib/bootstrap`. Add a stylesheet link to `/lib/bootstrap/css/bootstrap.min.css` in an HTML page and apply Bootstrap classes to an element. Request the page to check the result. LibMan records its provider and libraries in `libman.json`; `unpkg` is another provider option. section 4.4.3 section 15.4.2







