Announcing DevExpress Support For .NET 5 Preview

ctodx
17 July 2020

As I'm sure you are aware, Microsoft have announced that .NET 5 would be the next major release of the .NET Core ecosystem after .NET Core 3. Since development of the .NET Framework itself has been halted (apart from bug fixes, etc) at v4.8, they've dropped the "Core" name from .NET 5 since it and its successors will be the only .NET going forward.

Although still in Preview mode, with a projected release date in November 2020, .NET 5 includes many new enhancements that will make your applications and development process better and easier.

.NET Schedule

dotNetSchedule

  • .NET Core 3.0 was released in September 2019.
  • .NET Core 3.1 was released in November 2019, and falls under the Long Term Support (LTS) program.
  • .NET 5.0 will be released in November 2020.
  • Major releases of .NET will occur every year, and Microsoft have stated that even-numbered releases will fall under the LTS program.
  • Microsoft are emphasizing a predictable schedule, with minor releases if needed.

With regard to .NET 5, Microsoft have published a series of preview versions (1, 2, 3, 4, 5, 6). With each new preview release, we have been testing our components and libraries to support the changes within .NET 5.

DevExpress v20.1.6 supports .NET 5

Today, we are pleased to announce that DevExpress controls, components, and frameworks from v20.1.6 onwards are officially compatible with .NET 5 preview 6 or later. You can download them early next week (20 or 21 July) from both the Download Manager and NuGet.

If you are ready to experiment and try out .NET 5, here's a quick synopsis of what you will need to do.

Prerequisites

Move your app to .NET 5

If you have an application that uses .NET Framework and not .NET Core, you will have to migrate it to .NET Core 3 first. After which...

If you have an application that uses .NET Core 3, follow the steps below:

  • Change the Target Framework to specify it as net5.0:

    <Project Sdk="Microsoft.NET.Sdk">    
        <PropertyGroup>
            <OutputType>Exe</OutputType>
            <TargetFramework>net5.0</TargetFramework>
        </PropertyGroup>
    </Project>
    
  • In Visual Studio, go to Tools > Options > Preview Features and select the Use previews of the .NET Core SDK option (and, as it indicates, you will have to restart Visual Studio before doing any further work):

    UseDotNET5InVS

Desktop Enhancements

.NET Core 3 already supports desktop platforms such as WinForms and WPF. .NET 5 adds support for UWP (WinUI) and Xamarin (Maui), includes new .NET APIs, and extends the features for desktop development.

WPF

Visual Studio v16.3 allowed you to use a new XAML Designer for WPF .NET Core applications. We tested this XAML Designer with our WPF controls in .NET 5, and we are pleased to announce they fully support the XAML Designer features available for .NET Core.

WPFDesigner

Visual Studio v16.5 added a new feature called Suggested Actions. These actions give you easy access to the most used properties of a control selected within the XAML Designer. We are still exploring whether we can support Suggested Actions within DevExpress WPF controls.

SuggestedActions

Documentation: DevExpress WPF Controls - .NET Core Support

WinForms

Support for WinForms with .NET Core is, shall we say, a little more complicated. Microsoft announced that you can use the Windows Forms Designer for .NET Core projects in Visual Studio v16.6:

WinFormsDesigner

As you can see, the Designer renders forms already created using our controls correctly. However, the current version still does not offer the required extension APIs in order to fully support DevExpress design-time features, including Toolbox. Microsoft have stated that this required support for third party controls is coming, and we are providing input to that team when we can and when asked.

At present, you can use the workarounds demonstrated in the Using the WinForms designer for .NET Core projects section of this official blog post by Microsoft: How to port desktop applications to .NET Core 3.0.

We recommend that you use the second workaround from that post:

"You can have two project files in the same directory as your WinForms project: the old .csproj file from the existing .NET Framework project and the new SDK-style .csproj file of the new .NET Core WinForms project. You’ll just have to unload and reload the project with corresponding project file depending on whether you want to use the designer or not."

Again, we are working closely with Microsoft to ensure that the Windows Form Designer fully supports our WinForms controls for .NET 5 projects. We have no schedule as to when that support will be available.

Documentation: DevExpress WinForms Controls - .NET Core Support

Other Enhancements

Microsoft has clearly stated that .NET 5 is the sole future of the .NET family. All significant enhancements and new features to .NET will be part of .NET 5 and its successors, including language changes, runtime capabilities, and much more:

  • .NET 5 includes C# 9. C# 9 has numerous enhancements including records, top-level statements, improved pattern matching, and more. To learn all about what’s coming with C# 9, refer to Mads Torgersen's Welcome to C# 9 post.
  • .NET 5 allows you control over different runtimes.
  • Additional benefits with .NET 5 include Core Runtime & API Performance enhancements, and deployment flexibility.

Microsoft recommends that developers build new applications with .NET Core 3.1 and then migrate them to .NET 5.

Globalization issues

.NET 5 Preview 4 introduced the use of International Components for Unicode (ICU) globalization APIs by default on Windows 10 1903, or later. (For more information, see Globalization APIs use ICU libraries on Windows.) However, there is currently a bug that Globalization does not read user setting overrides for current cultures when using ICU. As a result, our controls do not apply these overrides. Microsoft is expected to fix this bug in Preview 8.

As a workaround, you can continue using NLS globalization APIs. Set a run-time switch to revert back to the ICU behavior.

Conclusion

Without a doubt, we at DevExpress are excited about .NET 5 and the future of the .NET and Visual Studio stack. I hope this blog post about where we currently stand with .NET 5 was helpful: we're keeping up but there's still a lot to do! As always, we welcome any feedback: feel free to post comments below, or contact us via the DevExpress Support Center.

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.
No Comments

Please login or register to post comments.