﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link rel="self" type="application/rss+xml" href="https://www.meziantou.net/feed.rss" /><title>Meziantou's blog</title><description>Practical articles about .NET and C#, from quick tips to deep dives: performance, testing, diagnostics, Roslyn analyzers, MSBuild, NuGet, PowerShell, and git.</description><lastBuildDate>Mon, 14 Sep 2026 12:00:00 GMT</lastBuildDate><link>https://www.meziantou.net/?utm_medium=social&amp;utm_source=syndication</link><item><title>XPath for custom types in .NET</title><description>XPath is widely known as the query language for XML documents. Most .NET developers associate it with XPathNavigator, XmlDocument, or XDocument. But what most people don&amp;#x27;t realize is that XPath can work with custom types too. In this post, I&amp;#x27;ll show you how to implement XPath for your own types and how it can be useful for searching complex object hierarchies. The problem Imagine you have a rich object&amp;#x2026;</description><link>https://www.meziantou.net/xpath-for-custom-types-in-dotnet.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">d6dbd2bc-76f7-470e-8c6c-94d5e4286f8a</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 14 Sep 2026 12:00:00 GMT</pubDate><category>.NET</category></item><item><title>Run temporary containers in .NET tests with Meziantou.Framework.TemporaryContainers</title><description>Integration tests are much more valuable when they run against real services. Instead of mocking a database or cache, you can start a temporary container, run your test, and dispose everything at the end. The Meziantou.Framework.TemporaryContainers package provides a lightweight API to manage disposable containers from .NET. Its main difference with the existing libraries is that it is not tied to Docker.&amp;#x2026;</description><link>https://www.meziantou.net/run-temporary-containers-in-dotnet-tests-with-meziantou-framework-temporaryconta.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">a98cd9bd-d1ef-4bf7-a6b8-94bfec99787e</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 07 Sep 2026 12:00:00 GMT</pubDate><category>.NET</category></item><item><title>Generate and review the public API of a .NET library</title><description>When maintaining a library, one of the easiest ways to introduce a breaking change is to update a public type without noticing its impact on consumers. You can use the Microsoft.CodeAnalysis.PublicApiAnalyzers analyzer to generate a file with the list of members. However, I don&amp;#x27;t like it as the members are not in C# syntax. Also, if you don&amp;#x27;t have the same public API for all target frameworks, you get&amp;#x2026;</description><link>https://www.meziantou.net/generate-and-review-the-public-api-of-a-dotnet-library.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">bbd64a77-f19c-430c-8a4e-1d29175687ff</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 31 Aug 2026 12:00:00 GMT</pubDate><category>.NET</category><category>Tools</category></item><item><title>Limit what NuGet packages can do in your project</title><description>When you add a NuGet package to a project, you often think about the runtime library only. In reality, packages can also import MSBuild props/targets and Roslyn analyzers. Those assets run during restore, design-time build, or build. I&amp;#x27;ve already provided some examples of how this can cause issues in . This means a package can execute code on your machine or in CI without you notice. If you only need a&amp;#x2026;</description><link>https://www.meziantou.net/limit-what-nuget-packages-can-do-in-your-project.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">3453480d-0f10-47ad-9129-1e8c264e2da3</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 24 Aug 2026 12:00:00 GMT</pubDate><category>.NET</category><category>Security</category></item><item><title>Snapshot testing in .NET with Meziantou.Framework.SnapshotTesting</title><description>Snapshot testing is a technique where the output of a function or component is serialized and saved to disk the first time the test runs. On every subsequent run, the library re-serializes the output and compares it against the saved file. If they differ, the test fails. Meziantou.Framework.SnapshotTesting is a .NET library that makes snapshot testing straightforward. It handles serialization, file&amp;#x2026;</description><link>https://www.meziantou.net/snapshot-testing-in-dotnet-with-meziantou-framework-snapshottesting.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">2f5d26e6-6888-471e-9574-dbbd2a86eae9</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 10 Aug 2026 12:00:00 GMT</pubDate><category>.NET</category><category>Tools</category></item><item><title>Adding a Clone method to a C# record</title><description>Adding a Clone method to a C# record When using records, creating a copy with with is concise: var sample = new Sample(&amp;quot;meziantou&amp;quot;); _ = sample with { }; public record Sample(string Value); This works well, but sample with { } is not always obvious as a discoverable Clone API for consumers. Why public Sample Clone() is not allowed Records already have compiler-generated clone behavior used by with.&amp;#x2026;</description><link>https://www.meziantou.net/adding-a-clone-method-to-a-csharp-record.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">a5db1822-ce6a-42d0-9ab9-e83d093d66dc</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 03 Aug 2026 12:00:00 GMT</pubDate><category>.NET</category></item><item><title>Get a Unicode character name from a Rune in .NET</title><description>If you have a Rune and want its Unicode name (for example GRINNING FACE for &amp;#x1F600;), there is no built-in API in .NET today. Here are two practical options: Use the ICU library available on the operating system Use the Meziantou.Framework.Unicode NuGet package Method 1: Use ICU from the OS ICU exposes u_charName, which returns the Unicode name for a code point. using System; using&amp;#x2026;</description><link>https://www.meziantou.net/get-a-unicode-character-name-from-a-rune-in-dotnet.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">e6921c34-c757-4fae-a8b2-f57c738d6bc4</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 27 Jul 2026 12:00:00 GMT</pubDate><category>.NET</category></item><item><title>Enable SHA Pinning for GitHub Actions Across Personal Repositories</title><description>Pinning GitHub Actions to a full-length commit SHA is one of the simplest ways to reduce supply chain risk in your workflows. It ensures that a workflow keeps using the exact code you reviewed, instead of silently following a moving tag or branch. Tags are convenient, but they are mutable. A workflow that uses actions/checkout@v4 or a third-party action pinned to a tag can start running different code&amp;#x2026;</description><link>https://www.meziantou.net/enable-sha-pinning-for-github-actions-across-personal-repositories.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">9227ca2f-0856-4436-aa6c-616a89d52d0c</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 13 Jul 2026 12:00:00 GMT</pubDate><category>Security</category></item><item><title>Generate a Kiota client at build time from an ASP.NET Core OpenAPI file</title><description>In a previous post, I explained how to generate the OpenAPI document during the ASP.NET Core build and commit it to the repository. That gives you a versioned API contract that is easy to review in pull requests. In this post, let&amp;#x27;s go one step further: use that generated OpenAPI file as the input for Kiota, so your typed .NET client is also generated during build. The goal is simple: The server produces&amp;#x2026;</description><link>https://www.meziantou.net/generate-a-kiota-client-at-build-time-from-an-asp-net-core-openapi-file.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">43c85fad-a260-4dce-9677-b7bf45e56a8e</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 22 Jun 2026 12:00:00 GMT</pubDate><category>ASP.NET Core</category><category>.NET</category><category>Web</category></item><item><title>New lines are more than \r and \n</title><description>When we talk about new lines, most developers think about \r\n (Windows) and \n (Unix-like systems). That works most of the time, but it is not the full picture. Unicode and several regex engines recognize additional line break characters. If your application parses user input, logs, CSV-like content, or cross-platform data, this can matter more than you think. The line breaks you should know The most&amp;#x2026;</description><link>https://www.meziantou.net/new-lines-are-more-than-r-and-n.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">14475268-09c7-4c3e-92f3-bc90d41d97b3</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 15 Jun 2026 12:00:00 GMT</pubDate><category>.NET</category></item></channel></rss>