The .NET Stacks #55: 🆕 Ready or not, here comes .NET 6 Preview 5
Tags: csharp, dotnet, azure
Published: 2021-06-27 15:03:04

---
title: The .NET Stacks #55: 🆕 Ready or not, here comes .NET 6 Preview 5
published: true
date: 2021-06-27 13:25:00 UTC
tags: csharp,dotnet,azure
canonical_url: https://www.daveabrock.com/2021/06/27/dotnet-stacks-55/
---

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e8pxoqbunas06x3pwg4n.png)

Welcome to another busy week! Here's what we have in store this Monday morning:

- One big thing: .NET 6 Preview 5 has arrived
- The little things: Visual Studio 2022 Preview 1 has arrived, dropping support for older frameworks, Markdown tables extension
- Last week in the .NET world

* * *

## One big thing: .NET 6 Preview 5 has arrived

Even though it still seems that we're still recovering from Preview 4 announced around Build, it's about that time: .NET 6 Preview 5 [arrived last Thursday](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/). While Preview 4 brought a lot of developer productivity and experience features like Minimal APIs and Blazor WebAssembly AOT, Preview 5 is a jam-packed release with a lot of work going towards unification in .NET 6.

A big part of that is [SDK workloads](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#net-sdk-optional-workload-improvements)—[announced in Preview 4](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-4/#cli-install-of-net-6-sdk-optional-workloads)— a new .NET SDK feature that enables the .NET team to add support for new application types without increasing the size of the SDK. For example, you may want to include MAUI or Blazor WebAssembly application types as you need them. You can view SDK workloads as a package manager for the .NET SDK—the emphasis on _the_ SDK, as Microsoft's vision of one SDK is coming together.

On top of that, Preview 5 brings [NuGet package validation](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#net-sdk-nuget-package-validation), [a lot more Roslyn analyzers](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#net-sdk-more-roslyn-analyzers), [improvements to the `Microsoft.Extensions` APIs](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#libraries-microsoft-extensions), a [new JSON source generator](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#libraries-jsonserializer-source-generation), [WebSocket compression](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#libraries-websocket-compression), [OpenTelemetry support](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#libraries-support-for-opentelemetry-metrics), and much more. What about ASP.NET Core? Hot Reload [is enabled by default](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-5/#net-hot-reload-updates-for-dotnet-watch), [improvements to Blazor WebAssembly download size with runtime relinking](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-5/#reduced-blazor-webassembly-download-size-with-runtime-relinking), [faster gets and sets for HTTP headers](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-5/#faster-get-and-set-for-http-headers), and more.

With EF Core, Preview 5 [brings the first iteration of compiled models](https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-6-0-preview-5-compiled-models/). Much like Blazor WebAssembly ahead-of-time (AOT) compilation, the compiled models functionality addresses increasing your startup time. As Jeremy Likness notes: "If startup time for your application is important and your EF Core model contains hundreds or thousands of entities, properties, and relationships, this is one release you don’t want to ignore."

The EF team is reporting 10_x_ performance gains using compiled models. How does this work? When EF creates a context, it creates and compiles delegates to set the table properties. This gives you the ability to query properties right away. Using lazy initialization, EF Core only is accessed when needed. You'll [want to check out the blog post](https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-6-0-preview-5-compiled-models/) for an in-depth discussion of all that's involved. While a fast startup time won't get any complaints, keep in mind that global query filters, lazy loading proxies, change tracking proxies, and `IModelCacheKeyFactory` implementations aren't supported yet.

If mobile/desktop development is your jam, you'll also [want to check out MAUI updates for Preview 5](https://devblogs.microsoft.com/dotnet/announcing-net-maui-preview-5/).

* * *

## The little things: Visual Studio 2022 Preview 1 is here, dropping support for older frameworks, Markdown tables extension

After much fanfare about 64-bit support, Visual Studio 2022 Preview 1 [is now here and available for you to try out](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-preview-1-now-available/). By all accounts, it seems to be smooth and snappy—you know, as it should be—and can be installed with earlier versions of Visual Studio. You can [check out the Visual Studio 2022 roadmap](https://docs.microsoft.com/en-us/visualstudio/productinfo/vs-roadmap) to see what's coming next.

The 64 bits are getting most of the buzz, but you also may have [missed support for IntelliCode completions](https://devblogs.microsoft.com/visualstudio/type-less-code-more-with-intellicode-completions/). These updates complete code for you, sometimes even whole lines of code. Based on your context, it'll predict the next part of code to write, and gives you the option to `Tab` to accept the changes. Mark Wilson-Thomas mentions this is done by combining a "rich knowledge of your coding context" and also a transformer model that is trained on around half a million public open-source GitHub repositories.

Here's a quick example of me testing it out:

![](https://www.daveabrock.com/content/images/2021/06/image-2.png)

In another example, I wrote a function to print out the first name and last name—it suggested I concatenated the strings together. (I would have preferred string interpolation, but I digress.) Then, as I did a `WriteLine` call, it suggested I use the method I just wrote.

* * *

The .NET team is embarking on an effort [to drop older framework versions](https://github.com/dotnet/announcements/issues/190). While dropping frameworks can be a breaking change, building for every framework version increases complexity and size. The team worked around this by harvesting—building for current frameworks but downloading a package's earlier version and harvest binaries for earlier frameworks. This allows you to update without the worry of losing a framework version, but you won't get any fixes or features from these binaries.

Starting with .NET 6 Preview 5, the .NET team will no longer harvest to ensure support for all assets. This means they are dropping support for frameworks older than .NET Framework 4.6.1, .NET Core 3.1, and .NET Standard 2.0.

As [Richard Lander writes](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/#libraries-dropping-support-for-older-frameworks):

> If you’re currently referencing an impacted package from an earlier framework, you’ll no longer be able to update the referenced package to a later version. Your choice is to either retarget your project to a later framework version or not updating the referenced package (which is generally not a huge take back because you’re already consuming a frozen binary anyways).

* * *

Here's something I learned this week: there's a [Markdown Tables extension in Visual Studio Code](https://twitter.com/DynamicWebPaige/status/1404804509730316302). Who do I talk to about refunding all my time spent tweaking Markdown tables?

* * *

## 🌎 Last week in the .NET world

It's another busy week with new preview releases for .NET and Visual Studio.

### 🔥 The Top 5

- .NET 6 Preview 5 is out: Richard Lander [announces it](https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-5/), Daniel Roth [writes about ASP.NET Core updates](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-5/), Jeremy Likness [covers EF Core](https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-6-0-preview-5-compiled-models/), and David Ortinau [covers .NET MAUI](https://devblogs.microsoft.com/dotnet/announcing-net-maui-preview-5/).
- Visual Studio 2022 Preview 1 [is now available](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-preview-1-now-available/), and [so is 2019 16.11 Preview 2](https://devblogs.microsoft.com/visualstudio/visual-studio-2019-16-11-preview-2/).
- David Pine [writes about building SPAs with Blazor](https://dev.to/dotnet/why-build-single-page-apps-in-blazor-103m).
- Matthew MacDonald [writes about the new VS Code Remote Repositories extension](https://medium.com/young-coder/remote-repositories-a-better-experience-for-github-in-vs-code-9edcc7d20a41).
- Charlin Agramonte [explores drag-and-drop in Xamarin](https://xamgirl.com/exploring-drag-and-drop-in-xamarin-forms/).

### 📢 Announcements

- Scott Hanselman [introduces dotnet repl](https://www.hanselman.com/blog/dotnet-repl).
- Mika Dumont [shares what's new with Roslyn](https://devblogs.microsoft.com/visualstudio/learn-whats-new-in-net-productivity).
- The Uno Platform [introduces the 3.8 release](https://platform.uno/blog/uno-platform-3-8-new-winui-calendar-grid-controls-2x-performance-new-linux-scenario-and-more/).

### 📅 Community and events

- The next .NET Conf, on July 29, [will have an F# focus](https://focus.dotnetconf.net/).
- Jon Skeet [has a new book](https://codeblog.jonskeet.uk/2021/06/11/new-book-software-mistakes-and-tradeoffs/).
- The .NET Docs Show [talks to Konrad Kokosa](https://www.youtube.com/watch?v=TSvsj-nQxik).
- For community standups: Tooling [previews Hot Reload for WinForms and WPF](https://www.youtube.com/watch?v=s177EoV2-jY), Entity Framework [discusses Azure Cosmos DB and EF Core](https://www.youtube.com/watch?v=nEqH_XfCfho), and ASP.NET [builds Teams apps using Blazor](https://www.youtube.com/watch?v=Hz8i2HPSPts).

### 🌎 Web development

- Mahesh Sabnis [works with state management in Blazor apps](https://www.dotnetcurry.com/aspnet-core/blazor-state-management).
- Jignesh Trivedi [works on event handling in Blazor](https://www.c-sharpcorner.com/article/event-handling-in-blazor/).
- Dave Brock [updates a Blazor WebAssembly app from .NET 5 to .NET 6](https://www.daveabrock.com/2021/06/15/upgrade-blazor-static-app-net-5-net-6/) and [writes about REST API versioning in ASP.NET Core](https://www.telerik.com/blogs/your-guide-rest-api-versioning-aspnet-core).
- Marinko Spasojevic [uses Dapper with ASP.NET Core Web API](https://code-maze.com/using-dapper-with-asp-net-core-web-api/).
- Matthew Jones [continues his Solitaire in Blazor series](https://exceptionnotfound.net/solitaire-in-blazor-part-2-the-csharp-classes/).

### 🥅 The .NET platform

- Ben Watson [writes about Bing migrating their Workflow Engine to .NET 5](https://devblogs.microsoft.com/dotnet/migration-of-bings-workflow-engine-to-net-5).
- David Ramel [writes about Project Reunion updates](https://visualstudiomagazine.com/articles/2021/06/15/project-reunion-8-rc.aspx).
- Richard Lander [mediates a conversation about networking](https://devblogs.microsoft.com/dotnet/conversation-about-networking/) and [diagnostics](https://devblogs.microsoft.com/dotnet/conversation-about-diagnostics).
- Adam Storr [sets content for HttpClient testing with JSON.NET and System.Text.Json](https://adamstorr.azurewebsites.net/blog/setting-content-for-httpclient-testing-with-json.net-and-system.text.json).
- Daniel Gomez Jaramillo [writes about hot reload for .NET developers](https://www.c-sharpcorner.com/article/hot-reload-for-net-developers/).
- Varun Setia [describes a new programming model for handling JSON in .NET 6](https://www.c-sharpcorner.com/article/new-programming-model-for-handling-json-in-net-6/).
- Thomas Ardal [shows a name and profile photo with .NET and Gravatar](https://blog.elmah.io/show-a-name-and-profile-photo-with-dotnet-and-gravatar/).
- Patrick Smacchia [logically names embedded resources in a .csproj file](https://blog.ndepend.com/how-to-logically-name-embedded-resources-in-csproj/).
- Rick Strahl [runs .NET Core apps on a framework other than a compiled version](https://weblog.west-wind.com/posts/2021/Jun/15/Running-NET-Core-Apps-on-a-Framework-other-than-Compiled-Version).

### ⛅ The cloud

- David Ramel [writes about .NET 6 support on Azure Functions](https://visualstudiomagazine.com/articles/2021/06/11/azure-functions-net-6.aspx).
- John Reilly [works with Azure Functions and .NET 5](https://blog.johnnyreilly.com/2021/06/11/azure-functions-dotnet-5-query-params-di-bicep/).
- Davide Bellone [compares queues and topics in Azure Service Bus](https://www.code4it.dev/blog/azure-service-bus-queue-vs-topic).
- Hugo G Fernandez R [creates a RESTful API with automatic documentation on Azure App Service](https://www.codeproject.com/Articles/5261514/Creating-a-RESTful-API-with-Automatic-Documentatio).

### 📔 Languages

- Khalid Abuhakmeh [writes about C# pattern matching](https://khalidabuhakmeh.com/csharp-pattern-matching-quick-guide-and-examples).
- Niels Rasmussen [goes deep on record structs in C# 10](https://nietras.com/2021/06/14/csharp-10-record-struct/).

### 🔧 Tools

- Mitchel Sellers [works on DI, async, and HangFire for background processing](https://www.mitchelsellers.com/blog/article/dependency-injection-async-and-hangfire-for-simple-background-processing).
- David Ramel [writes about C# scripting](https://visualstudiomagazine.com/articles/2021/06/14/csharp-scripting.aspx).
- Mark Wilson-Thomas [writes about IntelliCode completions in Visual Studio](https://devblogs.microsoft.com/visualstudio/type-less-code-more-with-intellicode-completions/).

### 🏗 Design, testing, and best practices

- Steve Smith [writes about prioritizing and microservices](https://ardalis.com/prioritizing-and-microservices/).
- Derek Comartin [talks about leveraging event-driven architecture for the real-time web](https://codeopinion.com/real-time-web-by-leveraging-event-driven-architecture/).
- David Adsit [compares TDD and BDD](https://www.pluralsight.com/blog/software-development/tdd-vs-bdd).
- Anwar Al Jahwari [writes about the Interface Segregation Principle](https://better-dev.io/interface-segregation-principle/).

### 🎤 Podcasts

- .NET Rocks [talks about open source in the enterprise](https://www.dotnetrocks.com/default.aspx?ShowNum=1744).
- The .NET Core Podcast [discusses greenfield and brownfield in .NET with Harry Bellamy](https://dotnetcore.show/episode-78-greenfield-and-brownfield-in-net-with-harry-bellamy-part-one/).

### 🎥 Videos

- On .NET [discusses clustering in Orleans](https://dev.to/dotnet/on-net-episode-clustering-in-orleans-11eh), [works with Azure AD B2C in ASP.NET](https://channel9.msdn.com/Shows/On-NET/Working-with-Azure-AD-B2C-in-ASPNET), talks about [using Blazor with Tailwind CSS](https://www.youtube.com/watch?v=9YdxhhgJvrE), [gets started with Azure Static Web Apps](https://www.youtube.com/watch?v=gkpxGhJ31ks), and [talks about the null coalescing operator in C#](https://www.youtube.com/watch?v=ZigtOlZ-bV0).
- Visual Studio Toolbox [continues a discussion on async debugging](https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Async-Debugging-Part-2).