How can we test a component based on Microsoft.Extension.AI that gives a different answer every time it runs? Here an implementation.
Category: .NET10
Tool calling with AIFunctionFactory
A language model knows what was in its training data and nothing else. Tool calling closes that gap with custom C# methods
Your first IChatClient
Second post where using Microsoft.Extensions.AI I build the first AI client keeping the history of the chats and instruct the agent who it is.
Why Microsoft.Extensions.AI exists
Microsoft.Extensions.AI is a small set of abstractions in the box, and providers that plug in behind the common AI providers such as Antropic or ChatGPT
Packaging, publishing and consuming Roslyn analyzers
Package PSC.Analyzers.Blazor as a NuGet analyzer, publish it to a feed, and consume it across a solution including how to make rules fail the build.
Unit testing your analyzer
Test the PSC001 rule with Microsoft.CodeAnalysis.Testing: reference assemblies, inline diagnostic markup, and positive and negative cases.
Writing your first diagnostic
Write the PSC001 rule: a DiagnosticAnalyzer that finds Blazor [Parameter] properties and flags the ones that aren’t PascalCase.
Build a Roslyn Analyzer from scratch
Start a custom Roslyn analyzer for Blazor. We scaffold PSC.Analyzers.Blazor, explain every csproj setting, and set up analyzer release tracking.
Turbocharging Your .NET Backend with Gzip
Learn how enabling Gzip compression in your .NET backend can dramatically improve performance for users on slow or unstable networks, and see how to implement it with a clean, modern code example.
Replacing Swagger with Scalar in ASP.NET Core
In this post, I show how replacing Swagger with Scalar in ASP.NET Core and NET10. Scalar is a UI that improve the experience in using the APIs
OpenAPI Enhancements in ASP.NET Core 10
A deep dive into the latest OpenAPI and Swagger improvements in ASP.NET Core 10, including Minimal APIs, versioning, Native AOT support, and UI customization.