Skip to main content Skip to footer

What’s New in .NET 8

.NET 8 offers improvements in performance, integration, diagnostics, and language compatibility across the different .NET stacks, including Blazor, MAUI, Windows Forms, ASP.NET Core, and more.

.NET 8 is also an “LTS” version - which stands for long-term support and means at least three years of support by Microsoft. With the 2023 v3 release, ComponentOne supports .NET 8 across most of its product line, including WinForms, WPF, WinUI, MAUI, Blazor, and ASP.NET Core.

Ready to Check it Out? Download the latest ComponentOne version today!

In this blog, we will cover .NET 8 highlights in more detail, explain why it’s beneficial to update and showcase some features we take advantage of in ComponentOne .NET UI controls.

.NET 8 Performance Improvements

.NET 8 still uses the JIT (Just In Time) - compiler as in previous versions, but it now processes code faster and lessens the process execution time. The garbage collector performance has also improved by allowing you to dynamically adjust the memory limit - this is most useful for cloud solutions where you may need to scale the resources based on demand.

The biggest reason to upgrade your .NET applications is usually performance, but yet again, Microsoft is pushing the performance limitations with each version of .NET. This makes it the number one reason to migrate, especially if you’re developing with Blazor.

Blazor WebAssembly (WASM) is significantly faster with .NET 8 thanks to improvements with its AOT - Ahead of Time - compilation.

.NET 8 Performance Improvements in FlexGrid for Blazor

While the .NET 8 performance improvements impact the entire .NET stack, we’ve seen the biggest gains in client-side Blazor with WebAssembly.

Check out our .NET 8 Blazor FlexGrid demos to test it yourself!

According to our tests for large data sets, the virtualized cell creation is up to 8 times faster than it was in .NET 6 and 7. These performance improvements are due to the AOT compilation in WebAssembly. You’ll also notice other layout and cell creation performance in .NET 8 is anywhere from 2 to 8 times faster than with .NET 6.

Additional Blazor Improvements in .NET 8

There are other big improvements for Blazor in .NET 8. Blazor is now a 5 year old web technology for building web experiences with C# and no JavaScript required. It’s fully integrated with ASP.NET Core for the backend and has a powerful UI component model. Our ComponentOne UI library helps expand upon the form components and helps display large data sets with virtualization using FlexGrid.

For .NET 8, Microsoft has focused on getting the best of server & client. With .NET 8, Microsoft has made it possible to use Blazor alone for both server and client-side functionality.

Previously, the server-side rendering generated the HTML on the server with things like ASP.NET MVC and Razor Pages, and Blazor was primarily on the client. Now, with .NET 8, you can use Blazor as a full web stack for all Web UI needs. Blazor components can render HTML from the server while also getting full clientside activity within the same app. You can even switch approaches at runtime and perform refreshes from the server on just parts of the application with Blazor, and it will update the DOM without needing a full page refresh. To support this, there’s a new project template.

Blazor Web App

The benefits of using the new Blazor Web App project template:

  • Full Web Stack Web UI with Blazor server-side rendering
  • Enhanced navigation and form handling
  • Stream rendering
  • Add client interactivity per component or page
  • Choose component render mode at runtime

Microsoft has published tutorials on migrating your existing Blazor Server or Blazor WASM application to the new Blazor Web App, which they now recommend for new development in Blazor. Still, you can continue using the existing applications and target .NET 8.

MAUI Improvements

As you may know, MAUI is the successor to Xamarin for developing native Android, Windows, Mac, and iOS apps with C#.

The big focus for MAUI in .NET 8 is quality as Microsoft focused on fixing bugs. Like every platform in .NET 8, MAUI also benefits from inherent performance improvements. And your single MAUI code base will also run on Android API 34 and Apple’s XCode 15.

For the ComponentOne MAUI FlexGrid control, we’ve added a new extension to our 2023 v3 installer that gives you a new project template called “MAUI GridApp”. You can choose .NET 7 and .NET 8 (available with the 2023 v3 hotfix).

MAUI Grid App

We also have the same project template available for WinUI. It’s great for quickly getting started with a data grid-centric application for WinUI or MAUI.

WinUI Project Template

.NET 8 WinForms Improvements

WinForms has been around for 20 years, and ever since it’s been included with .NET Core and now .NET 5 through 8, it’s continuing to go strong as probably the most efficient, but not always the most stylish, way to develop native Windows applications.

With .NET 6, Microsoft added full support for VB.NET. Since .NET 7, Microsoft has been focused on improving the look and feel of WinForms, including fonts, rounded corners, the folder browser window, drag and drop, new system icons, and high DPI, among other things. The goal is to better allow your applications to integrate with Windows 11.

.NET 8 also continues to improve the designer and VB.NET support with smaller incremental enhancements.

WinForms Designer Improvements

One of the biggest challenges with WinForms development since .NET 5 has been the designer. This is because Microsoft rewrote the designer architecture based on .NET runtime instead of .NET Framework. It’s been a journey for Microsoft and for our ComponentOne control library as we’re continuing to catch up with the .NET 8 designer experience to what we had for the .NET Framework.

For instance, in our 2023 v3 release, we’ve improved the chart designers for radar, pie, and treemaps so you can quickly build and customize the chart at design time.

WinForms FlexRadar Designer

WinForms Controls with .NET 8 Support

You may be wondering which of our ComponentOne controls are currently supported for .NET 8.

The good news is that we have .NET 8 support and .NET 8-based libraries for every ComponentOne control that was previously supported in .NET 5, 6, or 7. So migrating to .NET 8 from any of those versions of .NET is super easy if you’re working with ComponentOne UI controls. You can see the full list on our WinForms Edition page.

Multi-Targeting in NuGet Packages

Multi-targeting is a standard approach used by Microsoft with most packages. It basically means that all supported versions of .NET are within a single package, and usually, the package version number is agnostic to the .NET version you target.

One of the major differences with the ComponentOne 2023 v3 release for .NET 8 compared to previous versions is that we have started to multi-target in a single NuGet package. This means the .NET 6 version is included in the same 8.0.* package version as .NET 8. If the package name is the same for the .NET Framework, then it means the .NET versions 4.5, 4.6, and 4,8 are also included in the same package.

We understand it may be a bit confusing, especially for .NET Framework users who are familiar with our old naming and packaging structure. We believe this will make it easier for us to develop and distribute the controls to support more .NET versions simultaneously for the long term.

The best part about multi-targeting is that you, the developer, can always just grab the latest version of the library regardless of your application's .NET target.

The tips are simple:

  • When adding a new package, always grab the latest version. You no longer need to scroll down the version list and find some version in the middle, which was the case if you were looking for .NET Framework or .NET 5; once we had .NET 6 versions, those were always at the top of the version list. NuGet allowed us to release old versions after the fact, but it was not ideal.
  • When updating, you can just rely on the Nuget Package manager to know what package versions are supported.

Additional .NET 8 Improvements

So far, we've only covered some of the highlights in .NET 8. For a complete list with more details, you can check out Microsoft’s .NET 8 documentation. Here are some additional improvements:

  • Improvements to the JSON serialization and deserialization - JSON has become a standard format, and optimizing its management has been a priority for .NET
  • Reflection Improvements - reflection in .NET 8 now supports function pointers to obtain the system type of objects more easily
  • AOT - ahead of time compiling allows you to build a self-contained version of your app that doesn’t require a .NET runtime installed. .NET 8 improves the AOT compiler optimization for macOS and Linux
  • Diagnostics - with previous versions of .NET, you typically had to rely on 3rd party tools to help diagnose and collect user errors and runtime reports. Now, .NET 8 has some built-in tools and support for new APIs to monitor your application’s health and troubleshoot issues
  • Random Generation - with .NET 8, developers gain access to new randomizing tools that support selecting from input sets to speed up the random generation process
  • C# Hot Reload - every XAML developer knows about XAML hot reload, which lets you reload the application UI markup while it’s debugging. Now, with .NET 8, this is extended to include C# modification of generic methods and types
  • WPF - the Windows Presentation Foundation also gains performance improvements similar to WinForms and other platforms. Regarding ComponentOne WPF Edition, the .NET 8 version is combined with .NET 6 in the same multi-targeted NuGet package. However, the .NET Framework versions are not combined since they use different package names (i.e., C1.WPF.* vs. C1.Xaml.WPF.*). For a complete list of which WPF controls support .NET 8, check out our WPF Edition page
  • ASP.NET Core - while Blazor received most of the web enhancements in .NET 8, there are several things for ASP.NET Core, including some SignalR enhancements, new features for minimal APIs, and more like authentication and native AOT. Regarding ComponentOne ASP.NET Core components, you’ll find the .NET 8 support is in our latest packages with .NET 6.0

 ASP.NET Core

Conclusion

.NET 8 is a long-term support version of .NET, which means Microsoft commits to three years of support. The MESCIUS ComponentOne product line will also support .NET 8 for at least three years.

Microsoft will end support for .NET 7 in May of 2024. And .NET 6, which was released in 2021 with three years of support, will end in November of 2024.

With the ComponentOne controls, we plan to follow Microsoft’s release schedule for .NET 6 support and support for .NET 9 and beyond (assuming they don’t skip .NET 9 as they did with Windows 9).

Get the latest .NET 8 updates for UI controls and download the latest ComponentOne version today!

 

comments powered by Disqus