Cross-IDE Project Template Kit
- 5 minutes to read
The DevExpress Template Kit covers a broader range of usage scenarios when compared to our Project Template Gallery. New project templates support hybrid app development and new technologies.
The DevExpress Template Kit is available as a VSIX extension based on dotnet CLI. It is available for Visual Studio 2022 and Visual Studio Code (VS Code) on Windows, with plans to expand support to Rider for Windows and additional operating systems in the future.
Note
The DevExpress Template Kit includes project templates for .NET 8+ and C# only.
Important
The DevExpress Template Kit is currently available as a Community Technology Preview (CTP). It will eventually replace our Project Template Gallery (part of our Unified Component Installer).
Install and Run the Project Wizard for Visual Studio
In Visual Studio, select Extensions → Manage Extensions… to run Extension Manager. Type DevExpress Template Kit for Visual Studio in the search box and click Install (close the Visual Studio and follow instructions in the VSIX installer):
To run the Project Wizard, follow the steps below:
- Open Visual Studio and click Create a new project on the start page.
In the Create a new project window, select DevExpress 24.2 Template Kit and click Next:
Specify the Project Name and Location, and click Create. Use the Project Wizard to configure project parameters.
Install and Run the Project Wizard for Visual Studio Code
In Visual Studio Code, open the Extensions tab, type DevExpress Template Kit for VS Code in the search box, and click Install. For more information about extension management, see Extension Marketplace.
To run the Project Wizard, follow the steps below:
In the Explorer tab, click the New DevExpress Project button:
Specify the project name and press Enter:
- Select a project location and click the Select Folder button.
- Click Create Project. Use the Project Wizard to configure project parameters.
Build the Project
Install DevExpress component packages to build your project. You can use the DevExpress Unified Component Installer that adds a local NuGet feed to your machine.
As an alternative to the Unified Component Installer, you can configure a personal DevExpress NuGet Feed that loads required packages from DevExpress NuGet Gallery. To do this, follow the instructions below:
- Obtain your NuGet feed URL.
Register the source. You can do this in your IDE or from a CLI:
Included Templates
The following project templates are available in the DevExpress.Blazor.ProjectTemplates
NuGet package.
Common
- ASP.NET Core Blazor Application
dx.blazor
Creates a web (Blazor) application with DevExpress Blazor components and themes/styles. The application mimics the Microsoft Blazor template and supports Render Modes (Auto, Server, WebAssembly) and ASP.NET Core Identity and Token-based authentication.
Reporting & Data Analytics
- ASP.NET Core Blazor Repoting Application
dx.blazor.reporting
Creates a web (Blazor Server or WebAssembly) application that displays a Report Viewer (JavaScript-Based or Native version) and/or an End-User Report Designer. The backend defines a pre-built tabular render report bound to sample data (SQL, Object, or JSON). The application includes ready-to-use Docker files for deployment in Linux-based environments.
CLI Project Templates
You can also use a command line interface (CLI) to access project templates and create various DevExpress-powered projects for Blazor.
Install DevExpress CLI Templates
Execute the following command to install DevExpress Blazor project templates from nuget.org:
dotnet new install DevExpress.Blazor.ProjectTemplates
If you get the NU1101: Unable to find package DevExpress.Blazor.ProjectTemplates error, check whether the nuget.org source is enabled. To get a list of sources with their status information, call the dotnet nuget list source
command. To enable a source, call the dotnet nuget enable source <source name>
command.
If you are new to NuGet, visit the following page for more information about package management prerequisites: An Introduction to NuGet.
Tip
DevExpress CLI project templates are also available in the DevExpress NuGet Gallery (nuget.devexpress.com).
Create a Blazor Project
To create a new DevExpress-powered project, execute the following command:
dotnet new <template short name>
For example, the command below creates a Blazor project called MyBlazorServerApp in the current directory:
dotnet new dx.blazor -n MyBlazorServerApp
Use the following parameters to see available command options: -?
| -h
| --help
.
dotnet new dx.blazor -h
See the following topic for additional information: dotnet new command - Options.
Additional Command Line Parameters
-prerelease
,--use-prerelease-dx-version
- Indicate 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). Examples:
net8.0
,net8.0-windows
. --dx-version <version>
- Specifies DevExpress package version to be used in the project. Examples:
24.2.3
,24.2.*
,24.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).
Hybrid Development
If you are interested in Blazor Hybrid applications, you can find a Blazor Hybrid WinForms Application template on the WinForms tab.
dx.win.hybrid.blazor
- Creates a hybrid desktop (WinForms) application with a BlazorWebView-powered form and DevExpress themes/styles. The application supports Dependency Injection (DI) and integrates the DevExpress Blazor Data Grid control (requires a subscription that includes Blazor Windows Forms components).
Refer to the following topic for more information: Template Kit for WinForms.