What Changed
XAF's Blazor, Web API Service, and WinForms (.NET 5) v22.1 assemblies, demos, and project templates target .NET 6 instead of .NET 5. To use .NET 6, you must first install Visual Studio 2022 (v17.1) or higher.
NOTE: We also want to assure our existing .NET Framework XAF users (Windows Forms and ASP.NET Web Forms) that they are safe regardless of .NET 5/.NET 6 development - you can stay on .NET Framework and other Visual Studio versions as long as your business dictates. We will do our best to support you and address your needs along the way.
Reasons for Change
.NET 6 is a long-term support (LTS) release, and with it we can deliver the best experience from a UX and performance perspective for Blazor, XAF Model Editor, and our WinForms design-time. For more information on this topic, please review these Microsoft articles: What's new in .NET 6 | Migrate from ASP.NET Core 5.0 to 6.0.
Impact on Existing Apps
Semi-Automatic Migration with the Project Converter (recommended)
To simplify the migration process, the DevExpress Project Converter will attempt to re-target your XAF projects to .NET 6 automatically. Important Note: Our Project Converter will not update your non-XAF projects, custom dependencies, or code. You will still need to complete .NET 6 migration manually. For more information, see Breaking changes in .NET 6 | Migrate from ASP.NET Core 5.0 to 6.0.
Although your SolutionName.Module (as well as other platform-agnostic modules) can still target .NET Standard, we also recommend that you update them to .NET 6. The only reason to have your SolutionName.Module
on .NET Standard is to reuse it in .NET Framework or other .NET Standard modules. Example: we used a .NET Standard 2.0 platform-agnostic module with XAF WinForms, ASP.NET WebForms, and ASP.NET Core Blazor Server apps at XAF - How to show the number of nested List View items in tab captions.
Tip: To reference a module in multiple apps/libraries for different target frameworks, use Cross-platform targeting or Multi-Targeting. This approach will help you avoid two CSPROJ files for different Target Frameworks - less code duplication and maintenance costs for your solution. To make it work, the CSPOJ file defines
TargetFrameworks
element and required dependencies for each target conditions:<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
.
Manual Migration
Scenario 1. WinForms .NET 5
Make sure that your SolutionName.Module.Win
and SolutionName.Win
projects (as well as related WinForms .NET 5 modules) target net6.0-windows
:
XML<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
Scenario 2. XAF Blazor .NET 5
2.1. Make sure that your SolutionName.Module.Blazor
project target net6.0
and Microsoft.NET.Sdk.Razor
:
XML<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
2.2. Make sure that your SolutionName.Blazor.Server
project (as well as related Blazor .NET 5 modules) target net6.0
and Microsoft.NET.Sdk.Web
:
XML<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>