How we ended up rewriting NuGet Restore in .NET 9

#552 – April 13, 2025

The beginning of break-through scale and performance

How we ended up rewriting NuGet Restore in .NET 9
39 minutes by The NuGet Team

Learn about the journey that led to a full rewrite of the NuGet Restore algorithm in .NET 9, achieving break-through scale and performance. Written from the perspective of several team members, this entry provides a deep dive into the internals of NuGet, as well as strategies to identify and address performance issues.

A Developer’s Guide to Building Robust ETL Data Flows in C# and .NET
sponsored by ETLBox

Connecting multiple data sources and dealing with raw, inconsistent data is a common problem — missing values, wrong formats, and duplicates often break downstream logic. This article shows how to build a structured, code- based process in .NET using a data flow architecture. Data is read, cleaned, validated, and stored in a database, while faulty records are logged. The flow processes records asynchronously and in parallel, making it suitable even for large data volumes.

Disabling localized satellite assemblies during dotnet publish
6 minutes by Andrew Lock

In this post Andrew explains how to reduce the size of .NET application publish output by preventing unnecessary localization satellite assemblies from being copied. He demonstrates how to use the property in project files to specify which culture resources should be included, or to exclude all satellite assemblies by specifying only "en". While globalization invariant mode doesn't affect build output size, this approach can significantly reduce published application size in scenarios where localization isn't needed.

Build a Model Context Protocol server in C#
8 minutes by James Montemagno

Learn how to build a Model Context Protocol (MCP) server using the C# SDK to enable seamless communication between AI models and applications. James provides a detailed walkthrough of creating an MCP, from basic setup to integration with APIs and data sources, using a "monkey database" example. He demonstrates how the server can be used with GitHub Copilot to process and visualize data, and explains how to containerize and publish MCP servers for wider use.

.NET DI Compatible System.CommandLine Facade
7 minutes by Peter Ritchie

In this article Peter presents CommandLineExtensions, a new library that simplifies command-line argument parsing by providing a fluent interface over System.CommandLine while integrating with modern .NET patterns like Dependency Injection. It offers a multi-step approach to defining command-line parameters with type safety and better readability, allowing developers to define options and arguments in contextual phases rather than dealing directly with System.CommandLine's API.

Understanding Anti-Forgery in ASP.NET Core
9 minutes by Maarten Balliauw

ASP.NET Core provides built-in protection against Cross-Site Request Forgery (CSRF) attacks using Anti-Forgery tokens, which prevent malicious websites from tricking users into performing unwanted actions on sites where they're authenticated. In this article Maarten explains how to implement Anti-Forgery in MVC, Razor Pages, and Minimal APIs, including configuration options and handling tokens in JavaScript requests.

And the most popular article from the last issue was:

newsletters