Back to Devexpress

Create an ASP.NET Core Blazor Dashboard Application using the .NET CLI Project Template

dashboard-405587-get-started-build-web-dashboard-applications-create-a-blazor-dashboard-application-cli.md

latest5.4 KB
Original Source

Create an ASP.NET Core Blazor Dashboard Application using the .NET CLI Project Template

  • Oct 07, 2025
  • 3 minutes to read

You can use the .NET command-line interface (CLI) to create a Blazor Server or Blazor WebAssembly Hosted application with the Dashboard control from the console.

Note

We implemented a new dotnet CLI-powered Project Wizard you can use across multiple IDEs: Cross-IDE Project Template Kit.

Install DevExpress CLI Templates

Execute the following command to install DevExpress Blazor project templates from nuget.org:

console
dotnet new install DevExpress.Blazor.ProjectTemplates

If the NuGet.org package source is disabled, you will get the following error: NU1101: Unable to find package DevExpress.Blazor.ProjectTemplates. To see the list of sources and their status information, run the command dotnet nuget list source. To enable a source, run the command dotnet nuget enable source <source name>.

If you are new to NuGet, review An Introduction to NuGet for more information about package management prerequisites.

Note

DevExpress CLI project templates are also available in the DevExpress NuGet Gallery (nuget.devexpress.com).

Create a Project

To create a Blazor application with the BI Dashboard control, execute the following command:

Blazor Server

console
dotnet new dx.blazor.dashboard -n DashboardApp

Blazor WebAssembly Hosted

console
dotnet new dx.blazor.dashboard -int Hosted -n DashboardApp

The command creates a Blazor Dashboard application called DashboardApp in the current directory.

You can use the following parameters to see available command options: -? | -h | --help. For example, execute the following command:

console
dotnet new dx.aspnetcore.dashboard --help

Refer to the following documents for information on template options:

dotnet new command - OptionsStandard options for .NET CLI templates.Template OptionsOptions specific to the DevExpress ASP.NET Core template.

Run the Project

To run a Blazor Server, navigate to the application folder and execute the dotnet run command to restore dependencies and run the application:

console
cd DashboardApp
dotnet run

For hosted Blazor WebAssembly applications, run the command from the DashboardApp.DashboardApp.Server folder:

console
cd DashboardApp\DashboardApp.Server
dotnet run

The command output contains the application URL, which can be different on different hosts:

Now listening on: http://localhost:5000

Open your browser and navigate to the URL specified in the command output to see the result.

The Web Dashboard application displays a sample dashboard and allows you to modify it, create a new dashboard and switch to Viewer mode:

Template Options

The following list contains options you can specify when creating DevExpress ASP.NET Core Dashboard project templates:

-prerelease, --use-prerelease-dx-versionA flag that indicates whether to use a pre-release DevExpress package version in the project.--framework <TFM>Specifies the target framework. It expects a target framework moniker (TFM). Example: net8.0.--dx-version <version>Specifies DevExpress package version to be used in the project. Examples: 25.2.3, 25.2.*, 25.2.*-*``--dx-nuget-feed <feed>Specifies the NuGet Feed URL. Refer to nuget.devexpress.com to obtain your personal feed URL (available for registered users).-int, --interactivity

Specifies which hosting platform to use for the BI Dashboard Control.

The default value is Server.

Available options are:

  • Server

  • Hosted

-ndd, --no-demo-dataSpecifies whether to create a project without a sample dashboard and predefined data source.

Next Steps

Next Steps

Create Dashboards on the Web Describes how to create and configure dashboards in the Web Dashboard control.Dashboard Component for Blazor Contains instructions on how to integrate the DxDashboard component into a Blazor application.Dashboard Backend Contains instructions that show how to configure the Web Dashboard on the server.