How to build AI features in .NET

#575 – September 21, 2025

without getting locked into specific providers

How to correctly build AI features in .NET
9 minutes by Roxeem

Microsoft.Extensions.AI helps .NET developers build production-ready AI features without getting locked into specific providers. It provides standard contracts like IChatClient and IEmbeddingGenerator that work with any AI model. The framework includes middleware for caching, logging, and monitoring. It supports advanced features like tool calling and streaming responses for better user experience.

How to Build Secure AI Agent Workflows
sponsored by WorkOS

AI agents with broad access can leak data, trigger unintended actions, or expose your platform to risk. WorkOS secures agent workflows with scoped access, least-privilege enforcement, auditability, and secure secret handling, so you don't have to rebuild your auth layer.

Measuring UI responsiveness in ReSharper
10 minutes by Kevin Gosse

Kevin shares how he built a visual tool to measure ReSharper's UI responsiveness while working on performance improvements. The tool works like a game FPS counter, showing real-time feedback about how smoothly it responds to user input. It uses a custom profiler that simulates tiny mouse movements and measures delays, displaying the results as an overlay on top of the editor.

Demystifying async void in C#
4 minutes by Ali Hamza Ansari

Async operations are an integral part of any application. In C#, mostly asynchronous methods return Task or Task, but there's also the odd case of async void. We know void is for synchronous operations, so why does C# even allow async void? Ali will dissect this question in his post by looking at the need and dangers of async void.

A reference .NET application implementing an e-commerce website
4 minutes by Mike Kistler

This app demonstrates how to build an e-commerce website using .NET 9 and .NET Aspire with a services-based architecture. The application includes Azure OpenAI integration and can be deployed to Azure using the Azure Developer CLI.

IHostedService vs. BackgroundService
7 minutes by Shahab Ganji

Hosted services in .NET implement the IHostedService interface with StartAsync and StopAsync methods. The application waits for all hosted services to complete before starting, making them ideal for startup tasks like database migrations. BackgroundService is an abstract class that also implements IHostedService but runs in a fire and forget manner. The application doesn't wait for background services to finish, making them perfect for long running tasks.

And the most popular article from the last issue was:

newsletters