>
>
>
.NET Digest #6

Artem Rovenskii
Articles: 27

.NET Digest #6

Welcome to the sixth edition of our .NET news and event digest! This issue is packed with updates, including the release of .NET 10 Preview 1. The PVS-Studio team is happy to present a selection of the most interesting and useful content. Let's dive in.

We're always looking for ways to improve, so we'd love to read your comments and suggestions :)

Feel free to send us some interesting findings using our feedback form!

Today's in the digest: .NET 10 Preview 1 and a collection of insightful articles.

Top news

.NET 10 Preview 1 is now available!

On February 25, .NET 10 Preview 1 was released, bringing changes to the .NET Runtime, SDK, and libraries. This version also introduces the first iteration of C# 14.

Here are some notable updates and enhancements:

  • the field keyword for properties;
  • implicit conversions for Span<T> and ReadOnlySpan<T>;
  • modifiers on lambda parameters (ref, in, out) without specifying the parameter type of the parameter type.

The new version introduces support for array allocation of value types on the stack, provided the array is guaranteed not to outlive its parent method. The developers expect more similar optimizations in the next preview versions.

Articles

.NET 9 Networking Improvements

The .NET 9 release brought many enhancements for those who work with networking technologies. This article shows new APIs, increased performance, boosted security, and much more.

C# Dev Kit Updates: .NET Aspire, Hot Reload, and More!

C# Dev Kit is actively developing, bringing exciting new features with each update. In this article, the author highlights some of the latest enhancements, including:

  • work on projects without a solution file (.sln);
  • any solution can be made into a .NET Aspire solution;
  • Hot Reload support for Razor/Blazor;
  • general improvements to debugging and testing.

New Features for Enhanced Razor Productivity!

Great news for developers who build web applications with Razor. A new "Extract to Component" feature has been added and is available with Visual Studio 17.2. Most importantly, the C# tokenizer/lexer was updated, which greatly improved the handling of C# code. Users have long reported issues with C# language support in Razor files, and the new Roslyn-based lexer finally addresses these problems.

.NET MAUI Performance Features in .NET 9

This article explores the performance improvements introduced in .NET 9 for .NET MAUI. The focus has been on optimization and NativeAOT support, helping developers reduce application size, shorten startup time, and improve stability across all platforms.

Object Pools in C#: Examples, Internals and Performance Benchmarks

Here you can read about the concept of C# object pools. The author talks about the two built-in implementations of ObjectPool and ArrayPool<T> pools. The author discusses various use cases and compares performance with and without object pools.

Func vs. Predicate vs. Expression in C# .Net

This article breaks down the fundamental delegate types in C#—Func, Predicate, Expression, and Action—explaining when and how to use each one.

Creating an analyzer to detect infinite loops caused by ThreadAbortExceptions

Andrew Lock explores a scenario in which an infinite loop can occur in the .NET Framework when a ThreadAbortException is thrown. The article tells about how to create your own Roslyn analyzer to autodetect this problem.

Bugs and suspicious places in .NET 9 source code

Traditionally, every year we analyze a new .NET release, searching for bugs and suspicious places in the source code. This time was no exception, so I suggest you dive into the mysterious world of .NET 9 bugs.

Microsoft makes mistakes too. Let's check MSBuild

We also analyzed MSBuild, a crucial tool for C# developers, and found a range of issues, including copy-paste errors, NullReferenceException risks, format string flaws, and much more.

Our Favorite NEW Visual Studio Features of 2024

The Visual Studio team has gathered all the major features coming to the product in 2024. All aimed to boost performance, optimize developers' work, and streamline the process of writing code. Major changes include a new extension manager, Drag/Drop between multiple Visual Studio instances, Code Search, integration with .NET Aspire, and more.

New Debugging and Profiling Features in Visual Studio (v17.13)

The Visual Studio 17.13 update introduces many new features for debugging code and profiling an application. Much of the change relies on AI. There are new debugging features based on GitHub Copilot. Now Copilot can auto-summarize in parallel stacks. For more selective analysis, profiling can now be done for individual functions and classes. Check out the full article for all the details!

What's New in .NET 10: Everything You Need to Know

This article covers all the major updates in .NET 10 Preview 1. From C# 14 and the .NET Runtime to JIT, SDK improvements, and changes in ASP.NET Core, Blazor, .NET MAUI, and EF Core

News

When will .NET Framework retire?

A question many developers have asked: "How much longer will the .NET Framework be supported?" While Microsoft hasn't provided a definitive answer, the author of this post has a little guess. All versions above .NET Framework 4.6.2 have no official retirement date.

But we know that the .NET Framework comes with Windows For example, Windows Server 2025 includes .NET Framework 4.8.1, and since support for Windows Server 2025 extends to 2034, .NET Framework is likely here to stay for a while.

New versions

Visual Studio 2022 v17.13 is Now Available!

Microsoft has released a new Visual Studio 2022. Version 17.13 has improved performance, added new features to GitHub Copilot (which is now free to use), and new features for debugging and profiling. Want more-welcome to the article.

PVS-Studio 7.35: MISRA C 2023 support, Qt Creator 15 plugin, and more

The latest version of PVS-Studio (7.35) is here! This release brings optimizations for analyzing large code fragments and improved diagnostic rules for Unity developers. Of course, it wasn't all about them. Here's the full list of new diagnostic rules:

  • V3211. Unity Engine. The operators '?.', '??' and '??=' do not correctly handle destroyed objects derived from 'UnityEngine.Object'.
  • V3212. Unity Engine. Pattern matching does not correctly handle destroyed objects derived from 'UnityEngine.Object'.
  • V3213. Unity Engine. The 'GetComponent' method must be instantiated with a type that inherits from 'UnityEngine.Component'.
  • V3214. Unity Engine. Using Unity API in the background thread may result in an error.
  • V3215. Unity Engine. Passing a method name as a string literal into the 'StartCoroutine' is unreliable.
  • V3216. Unity Engine. Checking a field for null may not work correctly due to implicit field initialization by the engine.
  • V3217. Possible overflow as a result of an arithmetic operation.
  • V4008. Unity Engine. Avoid using memory allocation Physics APIs in performance-sensitive context.

More details are available in the press release.

You can visit this page to get a trial key and try the latest version of the analyzer.

Thank you for reading! See you soon! Feel free to share your thoughts and findings with us!