Special Offer: My C#/.NET Bootcamp Course is out now. Get 10% OFF using the code FRIENDS10.

Visual Studio 2022 preview is available. Are you as excited as I am? In June, Microsoft released the first preview of Visual Studio 2022. A few weeks and preview versions later, it’s time to take a look at the most important new features.

Those features include 64-bit support, .NET Hot Reload, AI-trained code completion, running code in different environments, .NET MAUI, and much more.

As .NET developers, many of us use Visual Studio to develop software. With every new version of Visual Studio, we want to know what’s new and whether we should care about the new version or not.

Introduction

This video is the result of extensive research and hands-on experience with Visual Studio 2022. At the time of this recording, preview 3.1 is available.

There are so many new features that I can only touch the surface in this video. However, after watching this video, you should have a great understanding of what’s coming with Visual Studio 2022 and what’s important to you.

But, if you have enough time to explore a few features yourself, you can install Visual Studio 2022 side-by-side with Visual Studio 2019 using the Visual Studio installer. Luckily this allows you to make sure you don’t touch the Visual Studio version you need to do your productive work.

Now let’s finally explore the new features of Visual Studio 2022.

General Changes

Let’s start with the general changes. First, we have updated toolbar icons. I’m not sure how significant the impact will be, but it’s something you notice when starting Visual Studio 2022 for the first time.

Second, with Cascadia Code, we have a new fixed-width font for better readability. I’m sure you can customize the font you use, but if you are like me and always use the defaults, you’ll use a new font with Visual Studio 2022.

We also have updated and improved themes, customization, and sharing those settings between devices.

Visual Studio Is a 64-Bit Application

Let’s start with the most talked-about feature first. We buy better developer machines with more and more RAM. The previous version of Visual Studio already let us consume more RAM by extracting different components and running them in its own process. 

However, this strategy could not go on for longer, and with Visual Studio 2022, the main Visual Studio process is now a 64-bit process which means it can consume more than 4 GB of RAM.

It is especially helpful when dealing with big solutions. Microsoft made a comparison with a large project containing 1600 projects and about 300’000 files. While Visual Studio 2019 took more than 7 minutes to open the solution, Visual Studio 2022 was ready in around 2 minutes and 30 seconds.

So, in general, Visual Studio 2022 brings noticeable performance improvements and an overall better developer experience. If you are working with big solutions, write it in the comments how much faster Visual Studio 2022 is in your case.

.NET Hot Reload

.NET Hot Reload allows us to change code in a running application without restarting it or pausing it. I know this sounds too good to be true. Let’s jump into Visual Studio to see it in action.

This demo does not work in written form. You can watch it in the video.

There are some limitations to this feature. However, most of the time, we are now able to make simple code changes without rebuilding and restarting our .NET application.

In my opinion, .NET Hot Reload improves the feedback cycle a lot and allows for faster development.

Blazor

With Visual Studio 2022, we also get improvements for Blazor projects. .NET Hot Reload also works with Blazor applications. CSS changes made in Blazor apps should be applied without restarting the application.

You also have better navigation between components. For example, you can navigate to a component by pressing F12, and there is a code fix that allows you to create a new component from an unknown tag.

Code file formatting has also been improved, and we finally have a code fix to adding missing using statements. Last but not least, we can split the C# code into a code-behind file using another code fix.

IntelliSense – AI Code Completion

IntelliSense has been improved. Its code completion algorithm has been trained using more than half a million open-source repositories. You can expect better suggestions while typing code in Visual Studio.

It works like a source code prediction engine. It tries to complete the code line for you while you’re writing it.

Let’s take a look at the following ASP.NET WebAPI controller.

This demo does not work in written form. You can watch it in the video.

We have a Sum method that gets an object of type InputData as its argument. We now start writing the return statement. IntelliSense suggests a return 0 statement. 

It’s not what we want, but at least it would compile. I continue and type data.Number1 IntelliSense now knows what I want to do and suggests me the end of the line. With a double tab, the code gets inserted, and the implementation is completed.

IntelliSense is very powerful, and I highly suggest you try it yourself to see how much it’s improved compared to Visual Studio 2019.

.NET MAUI

.NET MAUI will be shipped with .NET 6 in November 2021. Using Visual Studio 2022, we can already install and explore the preview bits of .NET MAUI.

If you are a Xamarin developer, you should definitely check out .NET MAUI, the next evolution of the .NET mobile app development platform.

I have a link in the video description that lets you access all the information you need to getting started with .NET MAUI today.

More features I’m not covering:

There is so much more I’m not going to cover in this short overview video. However, I want to mention the features so that you have at least heard of them.

  • Hit once breakpoint when debugging
  • XAML live preview
  • Web Live Preview for ASP.NET
  • New features for C++ development.
  • Multi-Repo Git Support for Cross Team Collaboration
  • Remote debugging and testing on Linux
  • New JavaScript & TypeScript project types for React, Angular & Vue

Conclusion

Visual Studio 2022 delivers many new features. I understand that it depends on your situation and what technologies you use in your projects if you’ll gain a lot by upgrading and if you can use all the new features or not.

However, I will upgrade to it as soon as it’s released. Visual Studio 2022 will handle every project type that we currently use in Visual Studio 2019, so there is no reason for me not to upgrade.

Let me know in the comments what features you like the most or what features you want to learn even more. If there is enough demand for a specific feature, I’ll create a dedicated follow-up video.

If you want to learn more about .NET development, subscribe to this channel. Thanks for watching, and if you haven’t already, watch this video to learn more about .NET MAUI.

More Information

 

Claudio Bernasconi

I'm an enthusiastic Software Engineer with a passion for teaching .NET development on YouTube, writing articles about my journey on my blog, and making people smile.