Skip to main content
All docs
V25.1
.NET 8.0+

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Create a Solution

  • 3 minutes to read

This lesson explains how to use the DevExpress Template Kit to create a Cross-Platform .NET App UI (XAF) application for ASP.NET Core Blazor and Windows Forms, including authentication features.

Note

To continue with this tutorial, you need to install the DevExpress Template Kit extension.

#Step-by-Step Instructions

  1. From Visual Studio’s main menu, select File | New | Project… to invoke the Create a new project dialog.

    Create a new XAF project

  2. Select DevExpress v25.1 Template Kit and click Next.

    Select Template Kit, DevExpress

  3. Specify the project’s name (MySolution) and location and click Create.

    Specify Solution name, DevExpress

  4. In the invoked Template Kit window, select XAF.

    Select "XAF" in the Template Kit, DevExpress

  5. The XAF window contains a list of XAF application settings. Specify the following settings:

    • In the Platforms section, select Web (ASP.NET Core Blazor) and Desktop (Windows Forms) options.
    • In the Additional Modules section, select the Validation module.
    • In the Security Options section, deselect the Standard option. In this tutorial, we implement user authentication at a later stage.

    Leave the rest of the options in their default state and click Create Project.

    Customize created project, DevExpress

#Solution Structure

The solution contains the following projects:

MySolution.Module
A module project that contains platform-independent code. Use this project to define the business logic that applies to all target platforms.
MySolution.Blazor.Server
An ASP.NET Core Blazor application that generates a user interface based on the business logic you define in MySolution.Module.
MySolution.Win
A WinForms application that generates a user interface based on the business logic you define in MySolution.Module.

Solution Explorer view

Refer to the Application Solution Structure topic for information on the XAF solution structure.

#Database Connection

The DevExpress Template Kit allows you to create XAF applications that target Entity Framework Core(the default choice) or XPO ORM tool. For additional information on how to choose an ORM that suits your needs, refer to the following topic: Why We Recommend EF Core over XPO for New Development.

When you create a new application, the application wizard attempts to find an installed Microsoft SQL Server instance (LocalDB or Express) and sets the connection string accordingly. You can also connect to a different database system as described in the following topic: Connect an XAF Application to a Database Provider.

#First Run

You can now run the application. Click Start Debugging or press F5.

The ASP.NET Core Blazor project is set as the startup project. To run the Windows Forms application, right-click the MySolution.Win project in the Solution Explorer and select the Set as Startup Project item from the context menu.

The following images show the resulting ASP.NET Core Blazor and Windows Forms applications.

ASP.NET Core Blazor
ASP.NET Core Blazor application first run
Windows Forms
Windows Forms application first run

#Next Lesson

Implement a Data Model: Basics