Skip to main content
A newer version of this page is available. .

Application Solution Structure

  • 4 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 5+: WinForms, ASP.NET Core Blazor, and Web API applications

    application solution structure .net 5

  • .NET Framework 4.5.2+: WinForms and ASP.NET Web Forms applications

    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 Framework XAF WinForms application. Solution Wizard: select a platform

Projects

Module Project (.NET Framework & .NET 5+)

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.

WinForms Module Project (.NET Framework & .NET 5+)

WinForms Module Project

Use this project to add elements for the WinForms application version. You can implement a Controller that includes WinForms-specific code or an editor that creates a WinForms control.

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

ASP.NET Web Forms Module Project

Use this project to add elements for the ASP.NET Web Forms application version. You can implement a Controller that includes ASP.NET Web Forms-specific code or an editor that creates an ASP.NET Web Forms component.

Blazor Module Project (.NET 5+)

Blazor Module Project

Use this project to add elements for the ASP.NET Core Blazor application version. You can implement a Controller that includes ASP.NET Core Blazor-specific code or an editor that creates an ASP.NET Core Blazor component.

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

WinForms Application Project

Contains code specific to your application’s WinForms version. Usually, only the Program.cs (Program.vb) and WinApplication.cs (WinApplication.vb) files can be modified. Do not add business classes, editors, or Controllers to this project because XAF cannot automatically find these items and include them in your application. Use Module projects for this purpose.

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

ASP.NET Web Forms Application Project

Contains code specific to a browser-based interface. Usually, only the Global.asax.cs (Global.asax.vb) and WebApplication.cs (WebApplication.vb) files can be modified. Do not add business classes, editors, or Controllers to this project because XAF cannot automatically find these items and include them in your application. Use Module projects for this purpose.

Blazor Application Project (.NET 5+)

Blazor Application Project

Contains code specific to your application’s ASP.NET Core Blazor version. Usually, only the Program.cs, BlazorApplication.cs, and Startup.cs files can be modified. Do not add business classes, editors, or Controllers to this project because XAF cannot automatically find these items and include them in your application. Use Module projects for this purpose.

Web API Application Project (.NET 5+)

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 (CTP).

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.

You can also create a platform-specific solution with three projects: an application project, a module project, and a UI-specific module project. For Web API projects, platform-specific solution contains two projects: the Web API 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