.NET Core 6+ Migration Notes (WinForms, WPF)

WinForms Team Blog
30 August 2022

Microsoft continues to update .NET (.NET Core, if you prefer the previous name) and we are doing our best to address customer needs in this regard. In a previous post, I shared our plans for .NET. Today, I’d like to get a bit more practical and talk about potential issues you may encounter if you decide to switch to .NET 6 from .NET Framework (or an older version of .NET Core).

Deprecated API

Transitions to newer technologies rarely occur without bumps and hiccups. At some point, sacrifices will need to be made. In terms of the .NET 6+ transition, sacrifices involve outdated APIs.

Microsoft does a nice job of announcing/tracking outdated APIs. Before you rush into the upgrade, take a moment to review the following article: Obsolete features in .NET 5+. In addition to its comprehensive outdated API list, the article also explains how to suppress warnings if you cannot address an issue.

High DPI and Application Manifest

In the early days of DPI-aware application development, modifying an application's manifest file was the recommended way to set the required DPI awareness mode. Things have changed since then, and awareness mode is now set up differently.

In .NET 6, if you use the outdated approach (changing the manifest file), you will encounter a WFAC010 warning. To avoid this warning, use the abovementioned techniques instead (we expect to ship the "Project Settings Page" in v22.2, so this option will also be available to .NET users).

WPF applications are DPI-aware out-of-the-box and require additional steps only if you wish to enable PerMonitorV2 mode. In this case, follow steps from Microsoft’s Per Monitor DPI (WPF Samples) official guide. This guide utilizes the manifest file, which is not recommended for WinForms apps. The discrepancy between the two platforms was already noted here: WFAC010 build warning directly contradicts WPF guidance. The current (official) recommendation is to suppress the WFAC010 warning if you're using both WinForms and WPF in a single hybrid app.

Project Converter

The easiest way to update your existing WinForms or WPF project to the latest .NET version is to use the DevExpress converter tool available from the main Visual Studio toolbar ("Extensions" | "DevExpress" | "WinForms Controls vXX.X" or "WPF Controls vXX.X" | "Migrate the Current Project to .NET Core").

Get More Help

Before you start the .NET transition process, we ask that you review the following documentation topics (learn about limitations and incorporate our recommendations):

Survey

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.