Skip to main content

Create an ASP.NET Core Dashboard Application using the .NET CLI Tools

  • 2 minutes to read

You can use the .NET Core command-line interface (CLI) tools to an application with the ASP.NET Core Dashboard control from the console.

Prerequisites

You need a configured private DevExpress NuGet source to create an application using the .NET CLI Tools.

If you already have configured a private DevExpress NuGet source, proceed to the first step. Otherwise, add a private DevExpress NuGet source as described in the following help topic: Manage Packages with .NET CLI.

Step 1. Install DevExpress CLI Templates

Open the console and type the following command:

dotnet new install DevExpress.DotNet.Web.ProjectTemplates::24.1.7

The console displays the list of templates installed on your machine from this package.

Step 2. Create a Web Dashboard Application

Run the following command to create the asp-net-core-dashboard-project project for the current 24.1.7 version and .NET 6 framework:

dotnet new dx.dashboard -n asp-net-core-dashboard-project -pv 24.1.7 -f net6.0

The following options are available:

Option Description
-n, --name Specifies the project name and the name of the folder that contains the project.
-pv, --packages-version (optional) Specifies the DevExpress Dashboard NuGet and npm package version. If this option is not specified, the latest version is used.
-f, --framework (optional) Specifies the target framework for the project:
- net6.0 - The target framework is .NET 6 (default)
- net7.0 - The target framework is .NET 7
- net8.0 - The target framework is .NET 8
-ndd, --no-demo-data (optional) Specifies whether to create a project without a sample dashboard and predefined data source.

Step 3. Run the Project

Use the following command to run the project:

dotnet run

The project starts listening on http://localhost:5000. Open this URL in the browser to see the result.

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

Web Dashboard - CLI Template

Another quick way to create an ASP.NET Core Dashboard application is to use the DevExpress Template Gallery.

Next Steps

Create Dashboards on the Web
Describes how to create and configure dashboards in the Web Dashboard control.
ASP.NET Core Dashboard Control
Contains instructions on how to integrate the Dashboard control into an ASP.NET Core application.
See Also