﻿<?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, 21 Sep 2026 12:00:00 GMT</lastBuildDate><link>https://www.meziantou.net/?utm_medium=social&amp;utm_source=syndication</link><item><title>Using JsonPath with System.Text.Json to query JSON in .NET</title><description>When you need to extract values from complex JSON payloads, manual navigation quickly becomes hard to read and maintain. Meziantou.Framework.JsonPath provides a JSONPath implementation for System.Text.Json based on RFC 9535, so you can query JSON documents using concise, standard expressions. Installation Install the package from NuGet: dotnet add package Meziantou.Framework.JsonPath Parse and evaluate a&amp;#x2026;</description><link>https://www.meziantou.net/using-jsonpath-with-system-text-json-to-query-json-in-dotnet.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">5ea8dd48-6ec5-476d-8d39-b9dce811bcc7</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Mon, 21 Sep 2026 12:00:00 GMT</pubDate><category>.NET</category></item><item><title>Querying Roslyn syntax trees with XPath</title><description>In , I showed that XPathNavigator is not tied to XML. Any tree can be exposed as a node-set, and the XPath engine of System.Xml.XPath does the rest. That post used a folder hierarchy as an example. Here is a much more interesting tree: the C# syntax tree produced by Roslyn. The occasion for it was an issue on Meziantou.Analyzer: Rule to forbid primary constructors? (Opposite of IDE0290). The request was&amp;#x2026;</description><link>https://www.meziantou.net/querying-roslyn-syntax-trees-with-xpath.htm?utm_medium=social&amp;utm_source=syndication</link><guid isPermaLink="false">a013cf7e-2dac-4727-9240-74fa2f79697f</guid><dc:creator>Gérald Barré</dc:creator><pubDate>Sun, 20 Sep 2026 12:00:00 GMT</pubDate><category>Roslyn</category><category>.NET</category></item><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></channel></rss>