Manage packages in an existing project

3 Nov 20264 minutes to read

Package operations change NuGet references only. They do not generate control files.

Existing-project commands accept -p/--path with a project file, a project directory, or a supported subdirectory. Without it, the current directory is used. A directory with one Blazor project is selected automatically; when multiple projects are present, interactive mode presents a selector and No Interactive mode requires an explicit project path. --json emits one JSON document for script use.

Install a package by package name

Use the canonical package alias to add a Syncfusion® Blazor NuGet package reference to an existing project. For example, to add the Blazor DataGrid package by its alias (grid):

sfdotnet add blazor grid --path ./MyApp

Install a package using the exact package identifier

Use the canonical package ID or an exact, unambiguous package display name instead of the alias. For example, to add the Blazor DataGrid package by its package ID:

sfdotnet add blazor Syncfusion.Blazor.Grid --path ./MyApp

Update a package

To update a package in an existing project, use the same alias, ID, or display name:

sfdotnet update blazor grid --path ./MyApp

List all available packages

To list the packages available in the Blazor package catalog:

sfdotnet list blazor packages

Use --details on the list command for package descriptions, release status, registration requirements, documentation links, and whether a generated sample is available. Use --search <text> to filter the listed packages by alias, name, package ID, or description.

Available packages in the Syncfusion .NET CLI

List installed packages

To list the Syncfusion® packages already installed in an existing project:

sfdotnet list blazor installed --path ./MyApp

Search packages

To search the package catalog:

sfdotnet search grid --framework blazor

The search matches package aliases, IDs, names, and descriptions. Use --details to include package descriptions, release status, registration requirements, and documentation links in the results.

Package operation options

Option Description
-p, --path The project directory, .csproj file, or a supported subdirectory
-v, --version The Syncfusion® NuGet package version
--source Package source; Syncfusion® packages require https://api.nuget.org/v3/index.json
--configfile The NuGet configuration file to use
--dry-run Preview the action without making changes
--force Allow supported overwrites
--no-restore Skip dotnet restore after the action
--build Build the changed project before committing the operation
--no-build Skip dotnet build after the action
--details Show package descriptions and details (list and search)
--search Filter the listed packages by alias, name, package ID, or description (list)
--json Emit one JSON document

FAQs

Does sfdotnet add blazor grid generate the Grid demo?

No. Package operations change NuGet references only; they do not generate control files. Use sfdotnet new blazor --control grid during creation, or generate demos from the creation wizard.

See also