Summary .NET Conf 2021 | What's New in .NET 6 and Much More!

12 Nov 2021 15 min See Original (spanish)

In this post, we will look at what Microsoft and the various speakers brought us at the annual .NET Conf.

This is a quick summary, where we won't go deep into every topic, otherwise this post would never end – keep in mind there were nearly 40 hours of content.

 

I followed the conference live on my Twitter @NetmentorTw in this thread.

 

Note: All images in this post are taken from the presentations.

 

 

1 - What's New in NET 6 

Let's start just as the presentation did: the first thing we saw was the introduction of .NET 6 and how the .NET team created libraries that allow us to unify development for any type of app

 

unified libraries .net

 

This means that if we want to build web applications, cloud applications, desktop apps, games, or apps on a Raspberry Pi, most of our code will be the same, since it's at compile time that .NET 6 takes care of compiling for what you need. 

 

A constant topic throughout the conference was performance and how much it’s improved over previous versions. They mentioned that .NET 6 is up to 92% faster than .NET 5.

netconf rendimiento

Of course, a lot of time was devoted to presenting C# 10 and its new features, which we already covered in this post. For example, global usings, lambda improvements, or minimal APIs.

There were also presentations about the new F# version, F#6.

 

1.1 - Simplifying Development and Minimal APIs 

There was a lot of content around Minimal APIs. I even wrote a post giving my opinion, and in that post I listed my concerns, and I think these have been confirmed

 

The goal of minimal APIs, as well as high-level programs, is crystal clear and was repeatedly emphasized at the conference: Simplify the language, making things easier to attract new developers who already have experience with other languages like JavaScript. 

 

In my opinion, the goal is to attract all those developers who know that using nodeJS or expressJS is not the best option for backends, but .NET was much more complex and they were reluctant to jump in. 

Which is great, but the problem, as I feared, is that code is going to be a mess, as shown during the presentation:

caos en minimal apis

This is just a snippet of what was a single file with 30 endpoints, once things get even a little complicated, you end up with 2,000 lines of code in a single file.

Obviously, there are ways to clean this up, and techniques to implement that result in "clean minimal APIs", but unfortunately none of them were covered.

 

 

2 - Visual Studio 2022

Another big announcement was the new version of Visual Studio. While there was no dedicated conference (it was the previous day), they did show new features and how things work behind the scenes.

 

A lot, and I mean a lot, of emphasis was placed on hot reload, which blew me away because as you know from the video I made on YouTube, they planned to remove it. But in the end, I'm glad they included it for free for everyone. 

 

In the videos I've made recently, I'm already using VS22, so I've tested it. One of the main changes is the interface, which I personally really like. 

Besides that, they announced support for Blazor, MAUI, and even WebForms within Visual Studio itself.

editor dentro de visual studio

Then the usual improvements: Click and deploy, Azure integration, with GitHub Actions, and code autocomplete.

Let me make a point about code completion: the Roslyn team gave a presentation on how it works under the hood and that it uses machine learning.

imagen4

By the way, .NET 6 only works on Visual Studio 2022, not on earlier versions.

 

 

3 - Azure

While there was no dedicated Azure session, they dropped tidbits in every presentation, for example, we saw improvements in cosmosDB during the Entity Framework talk, and azure container apps when talking about K8s. 

But there was a presentation on Azure Functions and their roadmap.

azure functions roadmap

They mentioned that many .NET programs/features work better on Azure than on other platforms. Personally, I don’t like this, I understand the economic reasons, but it’s a slap in the face for those of us who don’t use Azure.

 

 

4 - Entity Framework Core 6

There were many mentions of overall performance improvements, but where it really shines is Entity Framework. There was even a talk focused on this, going as far as to say that dapper is only 2% better than Entity framework core in certain areas.

 

Whether it’s true or not, the gap is becoming smaller:

EF core perfomance

Other aspects mentioned included an increased number of data attributes you can assign. For example, now you can specify

The "Precision" attribute, so when you operate on the database, it automatically handles precision.

public class Product
{
    [Precision(18,2)]
    public decimal Price { get; set; }
    public string Name { get; set; }

    public Product(string name, decimal price)
    {
        Name = name;
        Price = price;
    }
}

Or when you have to map a type, you can now do it in one line via default conventions in the dbcontext configuration

configurationBuilder.Properties<String>().HaveMaxLenght(200);

 

 

5 - Blazor Improvements in .NET 6

I'm personally glad to be writing this point, as it means Microsoft has not only not killed off Blazor but is investing more and more resources in it. This indirectly makes it more likely for companies to use it in their frontend projects. 

 

Several improvements for Blazor. As always, the main improvement is performance, especially with AOT (ahead-of-time compilation). They showed an app drawing satellites spinning on a screen: a regular Blazor app could handle 12,800 moving satellites (at 60fps), while with AOT, it could handle 58,200.

blazor perfomance

Of course, this comes at a cost, which is the size of the application. What AOT does is compile to native code before deployment so the client’s browser doesn't have to interpret anything and can run it natively.

They showed a size comparison and explained that, as always, AOT is a solution, but not necessarily the right one for every case. Here yes, but in a business app it probably doesn't make much sense.

blazor aot app sizes

By the way, as you can see in the image, Blazor Web Assembly is now smaller than in previous .NET versions. In fact, we saw that the service worker itself is only 353kb, which is impressive.  

 

We also saw hybrid applications that allow you to run Blazor code through MAUI. 

This feature was already presented last year, but it was mentioned again because it's indeed very powerful.

blazor hybrid apps

To wrap up this section, Microsoft has created Fluent UI style components for Blazor, which is the style used in Windows.

 

 

6 - MAUI

Unfortunately, MAUI will not be officially released in .NET 6, but will come in the first quarter of 2022;

 

What we did see were fully working demos and presentations, but no performance data. Because of that, I assume that everything is perfect for the developer; what they need to do is improve the code behind the scenes.

 

This is one of those features you can’t believe works until you see it, yes, a single codebase to have iOS, Android, desktop, and macOS apps. On top of that, if your website is written in Blazor, you can have the web side with the same code too.

maui buttons

 

7 - ASP.NET Core MVC 

Microsoft hasn't forgotten about all the developers working with ASP.NET Core Mvc and is, of course, bringing performance improvements.

asp.net core mvc in .net6

In addition to performance, there are new features: Css Isolation (already available in Blazor), Async Streaming, and even better interactions with OpenAPI.

 

 

8 - Machine Learning in .NET 6

On machine learning and ML.NET, I wasn't going to comment because I'm not really up-to-date on the subject (and prefer not to discuss things I don't know well), but @Jonas_1ara pointed out the highlights in this thread (thank you! :D), which I'll summarize here:

 

The main benefit of ML.NET is adding a layer of abstraction over a wide range of scenarios, saving developers a lot of headaches (compared to, say, TensorFlow).

During the conference, ML Builder was heavily emphasized, as it's easy to use and supports CLI. It’s also being used by many of Microsoft’s internal clients, such as the Office suite, Bing, as well as by external customers.

 

One of the main goals is to optimize model usage through ONNX Runtime and, hopefully soon, offer full C# support for PyTorch via TorchSharp, which aims by the end of 2022 to allow consuming Python algorithms directly from C#.

 

machine learning net 6

 

9 - Special Mentions

Finally, I want to mention the projects that caught my attention most during the conference sessions:

  • First, for .NET Framework, there will be a new version 4.8.1, we’ll have to see what’s in store.
  • .NET Upgrade Assistant: a new application with a wizard to help us migrate from older apps like WinForms or .NET Framework to .NET 6; Link
  • Apps for Microsoft Teams: you can now develop apps for Microsoft Teams, these work not just on desktop, but also on mobile and in the web version.
  • Playwright: a library allowing you to run UI tests in .NET; Link.
  • BUnit: a library for unit testing Blazor; I’ve been following it for a while and I'm glad it got a mention here. We may see a video for the channel; Link.
  • Dapr: software that adds as a sidecar to our applications, and abstracts away much of the pain in distributed systems, such as service discovery. Maybe we'll cover it on the channel; Link.
  • Yarp: another reverse proxy, but this time from Microsoft, it looks like a reverse proxy as code, and they use it in production; Link.
  • Mass transit: many of you probably know this library, it has a ton of features, mainly acting as a layer on top of service bus. Likely to get a blog post or channel video in 2022; Link.
  • IoT: During the three days, there were sessions on .NET running in all sorts of strange places, from Raspberry Pi to the remarkable 2 e-ink tablet. Several sessions covered this, if you are interested.

 

otras librerias .netconf

 

 

This post was translated from Spanish. You can see the original one here.
If there is any problem you can add a comment bellow or contact me in the website's contact form

© copyright 2025 NetMentor | Todos los derechos reservados | RSS Feed

Buy me a coffee Invitame a un café