3 Reasons to Delay Adopting .NET 8 and 10 to do it ASAP

Firstly, we need to preface– you SHOULD adopt .NET 8 when it launches in mid–November. The benefits outweigh any potential downside, and we also outline that in the second part of this blog. What’s more, Uno Platform will support .NET 8 as soon as it launches; in fact, our dev branches already run on .NET 8 RC versions.   

That said, we did ask ourselves – are there any reasons why one would NOT want to adopt .NET 8 – is there something to look out for in case you are the kind of developer who doesn’t read all the blogs and is not always on the latest builds? We scoured the web; here is the result of our research: 

3 reasons you might delay .NET 8 adoption

1. Cannot Target .NET 6 Mobile Targets

The inability to connect to .NET 6 mobile targets is not new and has been like this since .NET 7’s release. That said, not everyone is in the know, and that could also be you. If you’d like, you can take part in this Twitter conversation. This is not bad; .NET 8 is infinitely better than .NET 6, but awareness is the key here. 

2. State Management for Blazor developers

As explained in detail on Rocky Lhotka’s blog, you should be aware of behavior changes for rich Blazor applications in .NET 8 vs .NET 6/7.  

3. Native AOT build error vs. complaint only

Some users are noticing that starting with .NET 8 RC builds if you are building for Native AOT while having a project reference that has a target framework that is not compatible with Native AOT (even if the target framework is not used), Native AOT will complain, and the app won’t build. That wasn’t the case before. The previous behavior only complained if no target framework was compatible with Native AOT.

10 Reasons to adopt .NET 8 immediately

There are, however, infinitely many more reasons to adopt .NET 8.   

.NET has been a reliable framework for building robust and scalable applications for years. With the upcoming release of .NET 8, the ecosystem has evolved to offer even more compelling features and improvements. Here are 10 reasons, out of many more, because of which you should update to .NET 8 ASAP 

1. Workload Clean

This feature addresses a long-standing issue for developers, offering a much-needed solution to the annoyance caused by leftover workload packs after updating the .NET SDK or Visual Studio. Now, with this new command, developers can easily clean up and manage workloads, providing a reliable workaround to restore their machines to a known good state enhancing the overall development experience.

2. Enhanced performance

Performance improvements are a core focus in .NET 8. It features advancements in areas like Just-In-Time (JIT) compilation, runtime, and memory management. Your applications will run faster and more efficiently, offering a better user experience. A must-read blog post on this topic was written by Stephen Toub, outlining 500 performance improvements in .NET 8. In addition, Rici Mariani wrote two in-depth blog posts analyzing heavy compute workloads in a few .NET flavors vs. Native. Hint – .NET 8 did well. (Part 1, Part 2). 

3. Modern language features – C#12: 

.NET 8 incorporates C# 12, the latest version of the C# programming language. This brings modern language features and enhancements, making your code cleaner and more maintainable. From pattern matching to nullable reference types, C# 12 empowers developers to write safer and more expressive code. A great blog highlighting 12 benefits of C#12 is here: C# 12: New Features and Improvements – DEV Community

4. Open-Source!

NET 8 is built with contributions from a vibrant open-source community. This means more libraries, tools, and resources are available for you to leverage, including Uno Platform itself! You can tap into a wealth of knowledge and solutions through open-source packages or community-driven support. 

5. NET Garbage Collector:

.NET 8 introduces a crucial feature for cloud-service scenarios, allowing dynamic adjustment of memory limits to optimize resource consumption based on demand. The RefreshMemoryLimit() API ensures the garbage collector aligns with the new limits. This benefits cloud-native applications, particularly on platforms like Kubernetes, by enabling real-time scaling of resource usage. The feature enhances efficiency, minimizing resource expenses during low-demand periods and contributing to overall cost optimization.   

6. System.Text.Json improvements

Enhancements to the System.Text.Json library improve user experience in Native AOT applications. It includes broader type support, generator improvements, and new JsonNode API methods for DOM-like JSON document handling. Users now enjoy increased customization options for serialization/deserialization, covering naming policies, read-only properties, and more. Source generator functionality is enhanced for better reliability, supporting required/init members and providing formatted code via JsonSourceGenerationOptionsAttribute. The overall goal is to offer a more efficient and versatile experience for JSON document handling.

7. New Source Generators (Configuration Binder, API)

.NET 8 introduces several new source generators designed to work with specific libraries or scenarios. For example, the configuration-binding source generator can generate strongly typed classes from appsettings.json files2. The minimal API source generator can generate request delegates for minimal APIs that use the new WebApplication.CreateSlimBuilder() method3. The MVVM source generator can generate observable properties, commands, and more for classes that use the MVVM Toolkit. 

8. New Output Path format

The new output path format in .NET 8 is a helpful feature that simplifies the organization and location of build outputs. It offers several benefits, such as gathering all build outputs together in a common location, which makes it easier for tooling to anticipate. Additionally, it separates the build outputs by project under this common location, preventing confusion and conflicts. Finally, it flattens the overall build output layouts to three levels deep, reducing complexity and improving performance.

9. New pattern for .NET image architectures

.NET 8 introduces a new pattern for building container images for multiple architectures. This pattern has the following advantages: 

  • It has better performance and better integrates with the BuildKit build model. 
  • It enables you to mix and match architectures with the .NET images you build. 
  • It opens the door to better optimized multi-platform images using docker buildx build with the –platform switch. 

10. Uno Platform

Call us biased – but Uno Platform supporting it on day 0 is a GREAT benefit. You will be able to develop cross-platform, single codebase applications everywhere .NET runs be it mobile, Linux or Web!  

Microsoft .NET 8 is a robust and versatile framework that brings numerous advantages to developers. With its cross-platform capabilities, performance enhancements, modern language features, web and cloud development support, and the backing of a thriving open-source community, it’s a GREAT choice for your next project.  

About Uno Platform
For those new to Uno Platform, it allows for creating pixel-perfect, single-source C# and XAML apps that run natively on Windows, iOS, Android, macOS, Linux, and Web via WebAssembly. It offers Figma integration for design-development handoff and a set of extensions to bootstrap your projects. Uno Platform is free, open-source (Apache 2.0), and available on GitHub.
Uno Platform

Uno Platform

Follow us on Twitter

Tags: