Skip to main content

Application Solution Structure

  • 3 minutes to read

An XAF solution contains multiple projects. This topic describes these projects and supported platforms.

The Solution Wizard allows you to create a solution for the following frameworks:

  • .NET 6+: WinForms, ASP.NET Core Blazor, and Web API applications + End-to-End/Functional test project

    application solution structure .net 6

  • .NET Framework 4.5.2+: WinForms and ASP.NET Web Forms applications + End-to-End/Functional test project

    application solution structure .net framework

Your solution may not include projects for all supported platforms. You can select platforms for the current solution in the Solution Wizard. The following image shows this wizard, which creates a .NET 6 XAF WinForms application. Solution Wizard: select a platform

Projects

Main Module Project (.NET Framework & .NET 6+)

module project

Use this project to implement UI-independent application elements. For example, you can define a Business Model and implement UI-independent Controllers. Your applications can use the same Business Model and share Controllers from this project.

Use the Add New Item dialog to declare a new class in the Module project.

Add New Item dialog

Utilize a special template to add a Business Object, View Controller, or Window Controller.

Platform-Specific Module Projects (.NET Framework)

WinForms Module Project

Use these projects to implement custom platform-specific Controllers, Property Editors, and other elements for your WinForms or ASP.NET Web Forms application.

Tip

These projects are also available in .NET 5+ solutions created in v21.2 and earlier. In .NET 6+ solutions created in v22.1+, you can add all ASP.NET Core Blazor-specific and WinForms-specific elements to the corresponding application project.

WinForms Application Project (.NET Framework & .NET 6+)

WinForms Application Project

Contains code specific to your application’s WinForms version.

If your solution includes the platform-specific module project, add business classes, editors, and Controllers to this project instead of the application project.

ASP.NET Web Forms Application Project (.NET Framework)

ASP.NET Web Forms Application Project

Contains code specific to your application’s ASP.NET Web Forms version.

ASP.NET Core Blazor Application Project (.NET 6+)

Blazor Application Project

Contains code specific to your application’s ASP.NET Core Blazor version.

If your solution includes the platform-specific module project, add business classes, editors, and Controllers to this project instead of the application project.

Web API Application Project (.NET 6+)

Web API Project

Contains Web API settings. See the following topic for more information on how to add a Web API service to your application: Backend Web API Service.

End-to-End/Functional Test Project (.NET Framework & .NET 6+)

Web API Project

Contains predefined configuration for end-to-end (functional) tests. In this project, you can write C#/VB.NET functional tests for your XAF applications.

Important Notes

WinForms, ASP.NET Web Forms, ASP.NET Core Blazor, and Web API applications can be built based on the same Business Model, business logic, and Controllers when all applications use the same set of modules.

If you do not need the WinForms, Blazor, Web API, or ASP.NET Web Forms application version, do not include the corresponding project in the solution. A straightforward application can contain two projects: the application project and the module.

Optionally, your XAF solution may include the Application Server Project, Workflow Server Project, and any other custom projects.

See Also