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.
Mahfoud Bouabdallah
Mahfoud Bouabdallah

The option Use previews of the .NET Core SDK is disappeared in the latest version 16.7.0 Preview 4.0

There is another problem  the report designer does not open :

Expected a proxy type, Microsoft.VisualStudio.WinForms.RemoteClient.Proxies.ComponentProxy.

18 July 2020
Customer100256
Do Nhu Vy
good news!
18 July 2020
Fabio Scarvaglieri
Fabio Scarvaglieri

Hello,

great to hear!

Just tried to create a class library and imported the old classes into it but getting:

Package 'DevExpress.Win 20.1.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v5.0'. This package may not be fully compatible with your project.

I'm using dotnet5 and newest Visual Studio Preview version for it:


What am I doing wrong?

Thanks!

20 July 2020
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

@Mahfoud: Yep, I would also like our Visual Studio Report Designer to be available in .NET 5 projects as soon as possible. The issue is complex and thoroughly in Microsoft's court: we're trying to help but the changes needed for third party designers to work with Visual Studio and .NET Core are numerous and intricate. Indeed, once the support is provided by the VS/.NET teams, we shall have to rewrite our base designer code.

For now, I would use the approach illustrated in the following help topic to design your reports:  Reporting in .NET Core 3 - Add an Auxiliary Desktop .NET Project.

Cheers, Julian

 
20 July 2020
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

@Fabio: Your best bet is to open up a support ticket with the Support team. That way we can monitor the thread much more easily.

Cheers, Julian

20 July 2020
Christophe Keller @ PTS
Christophe Keller @ PTS

We have been using .Net Framework along WinForms since 2005 and so far it has proved to be a winning strategy. We didn't jump on each new platform Microsoft presents every 2-3 years, rendering the previous platform obsolete.

Nowadays I I have no trust in Microsoft. Who's to say that they won't change their mind again in three years and the ones that jump on the .Net 5 today will get burned (again)?

21 July 2020
Junior Thurler
Junior Thurler

Ji Julian, could you please talk about the benefits of moving our Winforms systems based on .Net framework to .NET5 - or even provide a link so we can do a better understanding?




21 July 2020
Junior Thurler
Junior Thurler
And now with the .NET 6 and MAUI maybe DevExpress will improve Xamarin Forms supports with more components? 
21 July 2020
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

@Junior: There are two main benefits with regard to .NET 5 as far as I'm concerned.

The first is the one I mentioned above: Microsoft have explicitly stated that .NET Core is the way of the future. All new features and enhancements will happen for .NET Core, and .NET Framework will remain at v4.8 with bug fixes and little else being done to it.

The second is that .NET Core was designed to be a library, a set of DLLs, that can be shipped with an application. Your WinForms app installer doesn't have to check to see whether the required .NET Framework is installed in the user's GAC, you just ship the version of .NET Core that you've used to built/test your app inside the install. It's installed in the app's local folder along with the EXE. Easy.

Re MAUI: we're obviously going to be moving to .NET MAUI and will be enhancing the controls for it. We'll have more news in the near future.

Cheers, Julian

21 July 2020
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

@Christophe: Je ne pourrais rien dire pour changer votre point de vue. Restez avec le .NET Framework jusqu'à ce qu'il soit plus évident que .NET Core est la voie à suivre. Bien sûr, tous les premiers problèmes que nous voyons maintenant auront été résolus!

Cheers, Julian

21 July 2020
Artem D
Artem D
I'm honestly curious if you saw any performance improvement/degradation after moving to .net core (3.1 and above). It would be really interesting to see a post from your developers about the potential performance benefits (if any) they can realize in your suite of controls after moving to .net core.
31 July 2020
nexus99
nexus99

.NET 5 RTM is out and still devexpress controls does not work on winforms but microsoft controls do.

When will you properly support .NET 5 winforms with drag drop support and all designers?

11 November 2020
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

@nexus99

To answer the question as posed: when Microsoft complete the designer features and APIs that they have not yet implemented for .NET 5. The designer works for simple controls, but for our more sophisticated ones, not so much (indeed this was mentioned in one of the presentations at the virtual .NET Conf 2020). I just published a blog post about it all.

Cheers, Julian

11 November 2020
CRM-0b59f9ee-3fbc-48ef-aa24-9aa0936c39fe
Anthony
When upgrading a project, is there a certain order in which this should be done?  Does devExpress need updated before we upgrade our framework?  We use .NET 4.6 Framework and are currently upgrading to .NET 5.  I assume as long as we have v20.1.6 or later of devExpress, we do not need to worry about anything else?
23 June 2021

Please login or register to post comments.