Sign in

Gérald Barré

@meziantou.net
237 followers 96 following 61 posts

Microsoft MVP, Software engineer, blogger www.meziantou.net

PostsRepliesMedia
Gérald Barré @meziantou.net · 22/09/2026
Using JsonPath with System.Text.Json to query JSON in .NET #dotnet #json www.meziantou.net/using-jsonpath-wi…
meziantou.net
Using JsonPath with System.Text.Json to query JSON in .NET - Gérald Barré
Learn how to use Meziantou.Framework.JsonPath to evaluate RFC 9535 JSONPath expressions against System.Text.Json documents in .NET.
011
Gérald Barré @meziantou.net · 15/09/2026
XPath for custom types in .NET #dotnet #xml www.meziantou.net/xpath-for-custom-…
meziantou.net
XPath for custom types in .NET - Gérald Barré
Learn how to implement XPath queries for custom non-XML types in .NET, enabling users to search complex object hierarchies with a simple query language.
062
Gérald Barré @meziantou.net · 01/09/2026
Generate and review the public API of a .NET library #NuGet #dotnet www.meziantou.net/generate-and-revi…
meziantou.net
Generate and review the public API of a .NET library - Gérald Barré
Generate and review the public API of .NET libraries in pull requests to catch breaking changes before publishing a NuGet package.
211
Gérald Barré @meziantou.net · 14/07/2026
Enable SHA Pinning for GitHub Actions Across Personal Repositories #github #powershell #security www.meziantou.net/enable-sha-pinnin…
meziantou.net
Enable SHA Pinning for GitHub Actions Across Personal Repositories - Gérald Barré
Use the GitHub CLI to enable SHA pinning for GitHub Actions across all of your personal repositories.
010
Reposted by Gérald Barré
olegkarasik.bsky.social @olegkarasik.bsky.social · 02/07/2026
New issue of .NET R&D Digest is here! Thx to @lemire.bsky.social, @maartenballiauw.be, @chrisnas.bsky.social, @meziantou.net, @andrewlock.bsky.social & other authors for their g8 content! olegkarasik.wordpress.com/2026/07/02/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (June, 2026)
This issue includes bits of AI, software development, C++, C#, diagnostics, architecture and of course .NET and .NET Internals.
064
Gérald Barré @meziantou.net · 19/05/2026
Blazor - How to set a base component for all Razor components #aspnetcore #blazor #dotnet #performance www.meziantou.net/blazor-how-to-set…
meziantou.net
Blazor - How to set a base component for all Razor components - Gérald Barré
Learn how to use _Imports.razor to set a default base component for all Razor components in a Blazor application without repeating @inherits in every file.
031
Gérald Barré @meziantou.net · 05/05/2026
Disable HTTP caching by default in ASP.NET Core APIs #aspnetcore #dotnet www.meziantou.net/disable-http-cach…
meziantou.net
Disable HTTP caching by default in ASP.NET Core APIs - Gérald Barré
Learn why API responses should not be cached by default and how to implement middleware to prevent caching in ASP.NET Core applications.
020
Gérald Barré @meziantou.net · 21/04/2026
Evaluating CRON and RRule expressions in .NET #NuGet #dotnet www.meziantou.net/evaluating-cron-a…
meziantou.net
Evaluating CRON and RRule expressions in .NET - Gérald Barré
Learn how to parse and evaluate CRON expressions and iCalendar recurrence rules in .NET with Meziantou.Framework.Scheduling.
000
Gérald Barré @meziantou.net · 14/04/2026
Suppressing Roslyn Analyzer Warnings Programmatically using DiagnosticSuppressor #dotnet #roslyn www.meziantou.net/suppressing-rosly…
meziantou.net
Suppressing Roslyn Analyzer Warnings Programmatically using DiagnosticSuppressor - Gérald Barré
Learn how to programmatically suppress Roslyn analyzer warnings using the DiagnosticSuppressor API.
042
Reposted by Gérald Barré
olegkarasik.bsky.social @olegkarasik.bsky.social · 03/04/2026
New issue of .NET R&D Digest is here! Thx to @simonwillison.net, @birgitta410.bsky.social, @kief.com, @lemire.bsky.social, @kevingosse.net, @andrewlock.bsky.social, @meziantou.net, @stevesanderson.bsky.social & other authors for their g8 content! #dotnet olegkarasik.wordpress.com/2026/04/03/n...
olegkarasik.wordpress.com
.NET R&D Digest (March, 2026)
This issue includes bits (or I would rather say bytes) of AI, bits of software development, operating systems, web, diagnostics, performance, C++, C#,  and of course .NET and .NET Internals.
093
Gérald Barré @meziantou.net · 31/03/2026
URL Pattern Matching in .NET #NuGet #dotnet www.meziantou.net/url-pattern-match…
meziantou.net
URL Pattern Matching in .NET - Gérald Barré
A .NET implementation of the WHATWG URL Pattern API for flexible URL matching and routing with wildcards and parameter extraction.
020
Gérald Barré @meziantou.net · 24/03/2026
Speed Up .NET CI with Test Sharding #NuGet #dotnet #github www.meziantou.net/split-dotnet-test…
meziantou.net
Speed Up .NET CI with Test Sharding - Gérald Barré
Learn how to split .NET tests into deterministic CI shards to run in parallel and reduce pipeline feedback time.
132
Gérald Barré @meziantou.net · 17/03/2026
Implementing RFC-compliant HTTP caching for HttpClient in .NET #NuGet #dotnet #performance www.meziantou.net/implementing-rfc-…
meziantou.net
Implementing RFC-compliant HTTP caching for HttpClient in .NET - Gérald Barré
Learn how to implement HTTP caching in .NET using Meziantou.Framework.Http.Caching to reduce latency and network traffic with RFC 7234 and 8246 compliance.
030
Gérald Barré @meziantou.net · 10/03/2026
Visualize GitHub Actions runs with Meziantou.GitHubActionsTracing #github www.meziantou.net/visualize-github-…
meziantou.net
Visualize GitHub Actions runs with Meziantou.GitHubActionsTracing - Gérald Barré
Turn GitHub Actions runs into HTML, Chromium, Speedscope, and OpenTelemetry traces to quickly find bottlenecks, slow steps, and flaky tests.
000
Gérald Barré @meziantou.net · 03/03/2026
Creating case-sensitive folders on Windows using C# #dotnet #windows www.meziantou.net/creating-case-sen…
meziantou.net
Creating case-sensitive folders on Windows using C# - Gérald Barré
Learn how to enable per-directory case sensitivity on Windows using C# and P/Invoke. Create files with the same name but different case in the same folder.
020
Gérald Barré @meziantou.net · 17/02/2026
Validating PowerShell script syntax in GitHub Actions workflows #github #powershell www.meziantou.net/validating-powers…
meziantou.net
Validating PowerShell script syntax in GitHub Actions workflows - Gérald Barré
Learn how to validate the syntax of PowerShell scripts embedded in GitHub Actions workflows using a custom PowerShell function.
110
Gérald Barré @meziantou.net · 10/02/2026
Getting more information in MSBuild binlogs with property tracking #dotnet #msbuild www.meziantou.net/getting-more-info…
meziantou.net
Getting more information in MSBuild binlogs with property tracking - Gérald Barré
Learn how to enable MSBuild property tracking to get detailed information about property changes in your build logs.
251
Gérald Barré @meziantou.net · 20/01/2026
Retrieve method source file location at runtime using Portable PDBs in .NET #dotnet #msbuild www.meziantou.net/retrieve-method-s…
meziantou.net
Retrieve method source file location at runtime using Portable PDBs in .NET - Gérald Barré
Learn how to retrieve the source file path and line number for any method at runtime using Portable PDBs in .NET.
140
Gérald Barré @meziantou.net · 30/12/2025
Reduce GitHub Actions runner CPU usage www.meziantou.net/reduce-github-act…
meziantou.net
Reduce GitHub Actions runner CPU usage - Gérald Barré
In this post, I'll show you how to reduce the CPU usage of your self-hosted GitHub Actions runners by replacing the default busy-waiting sleep implementation with a more efficient one.
030
Gérald Barré @meziantou.net · 23/12/2025
Understanding and Managing Mark of the Web in .NET #dotnet #security #windows www.meziantou.net/understanding-and…
meziantou.net
Understanding and Managing Mark of the Web in .NET - Gérald Barré
In this post, I describe how to read, set, and remove the Mark of the Web security feature in Windows using .NET.
020
Gérald Barré @meziantou.net · 03/12/2025
Creating a custom MSBuild SDK to reduce boilerplate in .NET projects #dotnet www.meziantou.net/creating-a-custom…
meziantou.net
Creating a custom MSBuild SDK to reduce boilerplate in .NET projects - Gérald Barré
Learn how to create custom MSBuild SDKs to enforce coding standards, add packages dynamically, and configure .NET projects consistently.
251
Gérald Barré @meziantou.net · 11/11/2025
C# 14 Extension Members: Enhancing Polyfill Libraries #dotnet www.meziantou.net/csharp-14-extensi…
meziantou.net
C# 14 Extension Members: Enhancing Polyfill Libraries - Gérald Barré
Discover how C# 14 extension members extend beyond instance methods to include properties and static methods, enabling more comprehensive polyfill libraries.
000
Gérald Barré @meziantou.net · 21/10/2025
Thread-Safe Initialization with LazyInitializer #dotnet www.meziantou.net/thread-safe-initi…
meziantou.net
Thread-Safe Initialization with LazyInitializer - Gérald Barré
Learn how to use LazyInitializer.EnsureInitialized for thread-safe initialization in .NET as an alternative to Lazy<T> class.
010
Gérald Barré @meziantou.net · 14/10/2025
Understanding When Type.FullName Returns Null in .NET #dotnet www.meziantou.net/understanding-whe…
meziantou.net
Understanding When Type.FullName Returns Null in .NET - Gérald Barré
Learn about the specific scenarios in .NET where Type.FullName returns null, including generic types with open parameters and function pointers.
000
Gérald Barré @meziantou.net · 07/10/2025
How to Find an Available Network Port for a server in .NET #dotnet www.meziantou.net/how-to-find-an-av…
meziantou.net
How to Find an Available Network Port for a server in .NET - Gérald Barré
Learn how to find an available network port in .NET using the Socket class. This is useful for server applications, testing, and development tools that need to bind to ports without conflicts.
001
Gérald Barré @meziantou.net · 30/09/2025
Using Git insteadOf to Automatically Replace HTTPS URLs with SSH #git www.meziantou.net/using-git-instead…
meziantou.net
Using Git insteadOf to Automatically Replace HTTPS URLs with SSH - Gérald Barré
In this post, I describe how to use Git's insteadOf configuration to automatically rewrite HTTPS URLs to SSH URLs for seamless authentication.
000
Gérald Barré @meziantou.net · 23/09/2025
Batch migrate .sln files to .slnx format across repositories #dotnet www.meziantou.net/batch-migrate-sln…
meziantou.net
Batch migrate .sln files to .slnx format across repositories - Gérald Barré
Learn how to batch migrate .sln solution files to the new .slnx format across multiple repositories using automated tools.
030
Gérald Barré @meziantou.net · 02/09/2025
Using Multiple Loopback Addresses for Socket Binding #dotnet www.meziantou.net/using-multiple-lo…
meziantou.net
Using Multiple Loopback Addresses for Socket Binding - Gérald Barré
Learn how to use multiple loopback addresses beyond 127.0.0.1 for socket binding, allowing multiple services to run on the same port by using different addresses in the 127.0.0.0/8 range for testing and development.
000
Gérald Barré @meziantou.net · 26/08/2025
Git Worktree: Managing Multiple Working Directories #git www.meziantou.net/git-worktree-mana…
meziantou.net
Git Worktree: Managing Multiple Working Directories - Gérald Barré
Learn how to use Git worktree to manage multiple working directories from a single repository, enabling parallel development workflows.
020
Gérald Barré @meziantou.net · 19/08/2025
Accessing Windows Known Folders in C# with SHGetKnownFolderPath #dotnet www.meziantou.net/accessing-windows…
meziantou.net
Accessing Windows Known Folders in C# with SHGetKnownFolderPath - Gérald Barré
Learn how to access Windows Known Folders like Downloads and Desktop using SHGetKnownFolderPath API in C# when Environment.GetFolderPath is insufficient.
110
Gérald Barré @meziantou.net · 01/07/2025
How to Find Public Symbols That Can Be Internal Using Roslyn #dotnet #roslyn www.meziantou.net/how-to-find-publi…
meziantou.net
How to Find Public Symbols That Can Be Internal Using Roslyn - Gérald Barré
Learn how to use Roslyn to analyze your .NET solution and identify public symbols that are only used internally and can be safely changed to internal.
142
Gérald Barré @meziantou.net · 24/06/2025
How to Exclude Your Windows App from Screen Capture and Recall #dotnet #windows www.meziantou.net/how-to-exclude-yo…
meziantou.net
How to Exclude Your Windows App from Screen Capture and Recall - Gérald Barré
Learn how to prevent your Windows app from being captured by screen recording and screenshot tools using SetWindowDisplayAffinity.
000
Gérald Barré @meziantou.net · 17/06/2025
Automatically Rerun Failed GitHub Actions Workflows #github www.meziantou.net/automatically-rer…
meziantou.net
Automatically Rerun Failed GitHub Actions Workflows - Gérald Barré
This post explains how to automatically rerun failed GitHub Actions workflows using the workflow_run event and specific conditions.
010
Gérald Barré @meziantou.net · 03/06/2025
Automating Null-Forgiving Operator Removal in C# Projects #dotnet www.meziantou.net/automating-null-f…
meziantou.net
Automating Null-Forgiving Operator Removal in C# Projects - Gérald Barré
In this post, I describe how to automate the removal of the null-forgiving operator in C# projects using tools like Roslyn and MSBuildWorkspace.
120
Gérald Barré @meziantou.net · 13/05/2025
Use C# 14 extensions to simplify enum Parsing #dotnet www.meziantou.net/use-csharp-14-ext…
meziantou.net
Use C# 14 extensions to simplify enum Parsing - Gérald Barré
Learn how to use C# 14 extensions to simplify enum parsing, making your code more consistent, intuitive, and easier to understand.
041
Reposted by Gérald Barré
Anthony Simmon @anthonysimmon.com · 12/05/2025
Just dropped a deep‑dive on how we built Leap, an opinionated, reliable CLI tool powered by .NET Aspire to make distributed system development easier for all Workleap developers 🚀. medium.com/workleap/how... #dotnet #aspire
medium.com
How Workleap uses .NET Aspire to transform local development
We built Leap, an opinionated, reliable CLI tool to distribute .NET Aspire to all Workleap developers.
0154
Reposted by Gérald Barré
Richard Clark - devdevdev.net @devdevdev.net · 09/04/2025
Notre table ronde d'Avril est disponible en podcast et sur Youtube. Au menu dapr Agent, .NET 10, Aspire 9.2, Typescript en Go et UWP avec .NET 9. Animé par @anthonysimmon.com, @meziantou.net, @laurentkempe.com, Clément Sannier, Jérémy Jeanson et moi-même #podcast ⬇️⬇️⬇️
133
Gérald Barré @meziantou.net · 11/02/2025
Using Snapshot Testing to validate EF Core schema #EFCore #dotnet www.meziantou.net/using-snapshot-te…
meziantou.net
Using Snapshot Testing to validate EF Core schema - Gérald Barré
In this post, I describe how to use snapshot testing to validate the schema generated by Entity Framework Core.
020
Reposted by Gérald Barré
xUnit.net @xunit.net · 10/02/2025
We are considering changing some of the options for the ways tests run in parallel against one another. Please read this and add your thoughts. Thanks! github.com/xunit/xunit/... #DotNet #UnitTest
github.com
Looking for suggestions on improving parallelism · xunit xunit · Discussion #3164
We have two open issues right now related to how tests run in parallel: #1986 #2055 As I work through what the options for parallelism should be, I'm thinking maybe trying to set up a strict list o...
054
Gérald Barré @meziantou.net · 04/02/2025
Migrate from MSTest to xUnit using a Roslyn analyzer #dotnet #xunit www.meziantou.net/migrate-from-mste…
meziantou.net
Migrate from MSTest to xUnit using a Roslyn analyzer - Gérald Barré
In this post, I describe how to migrate from MSTest to xUnit using the Meziantou.MSTestToXunitAnalyzer Roslyn analyzer.
000
Gérald Barré @meziantou.net · 21/01/2025
Using Roslyn to analyze and rewrite code in a solution #dotnet #roslyn www.meziantou.net/using-roslyn-to-a…
meziantou.net
Using Roslyn to analyze and rewrite code in a solution - Gérald Barré
In this post, I describe how to use Roslyn as a library to analyze and rewrite code in a solution.
193
Gérald Barré @meziantou.net · 14/01/2025
Enhance Your .NET HttpClient with HSTS Support #dotnet www.meziantou.net/hsts-for-httpclie…
meziantou.net
Enhance Your .NET HttpClient with HSTS Support - Gérald Barré
In this post, I describe how to create an HttpClient that automatically upgrade requests to https based on HSTS preload list and response header.
041
Gérald Barré @meziantou.net · 07/01/2025
Exploring CollectionsMarshal for Dictionary #dotnet www.meziantou.net/exploring-collect…
meziantou.net
Exploring CollectionsMarshal for Dictionary - Gérald Barré
In this post, I explore how to use the CollectionsMarshal class to efficiently add or update key-value pairs in a Dictionary.
001
Gérald Barré @meziantou.net · 24/12/2024
Reading USN Journal with .NET #dotnet www.meziantou.net/reading-usn-journ…
meziantou.net
Reading USN Journal with .NET - Gérald Barré
In this post, I describe how to read the USN Journal with .NET.
031
Gérald Barré @meziantou.net · 17/12/2024
Generating SBOM for NuGet packages #NuGet #dotnet #security www.meziantou.net/generating-sbom-f…
meziantou.net
Generating SBOM for NuGet packages - Gérald Barré
In this post, I describe how to easily generate a Software Bill of Materials (SBOM) for NuGet packages.
021
Reposted by Gérald Barré
Richard Clark - devdevdev.net @devdevdev.net · 16/12/2024
Dernier épisode consacré aux nouveautés de .NET 9 : C# 13, la BCL et le tooling/SDK. Avec @meziantou.net et Patrick Smacchia de NDepend. devdevdev.net/net-9-c-13-l... #csharp #dotnet #dotnet9 #ndepend #mvpbuzz
033
Gérald Barré @meziantou.net · 10/12/2024
Using the binary log to find the source of a .NET dependency #dotnet #msbuild www.meziantou.net/using-the-binary-…
meziantou.net
Using the binary log to find the source of a .NET dependency - Gérald Barré
In this post, I describe how to use the binary log and MSBuild Structured Log Viewer to find the source of a .NET dependency.
194
Reposted by Gérald Barré
Barry Dorrans @blowdart.me · 06/12/2024
They left out naps. More seriously fuck you for dismissing bug fixing, testing and securing as unimportant unproductive things.
In a post Tuesday, Amazon Web Services said developers report spending an average of "just one hour per day" on actual coding.

The rest is eaten up by "tedious, undifferentiated tasks," AWS said. That includes learning codebases, drafting documents, testing, overseeing releases, fixing problems, or hunting down vulnerabilities, AWS said. The company didn't say where it got the data.
4535666
Gérald Barré @meziantou.net · 03/12/2024
NuGet Packages: security risks and best practices #NuGet #dotnet www.meziantou.net/nuget-packages-se…
meziantou.net
NuGet Packages: security risks and best practices - Gérald Barré
NuGet packages simplify code sharing, but they come with significant risks. Many developers install these packages without reviewing their contents or verifying updates, potentially exposing their systems to malicious code. This article explores the various ways NuGet packages can compromise your security, from MSBuild props and Roslyn analyzers to typo squatting and unlisted packages. Learn how to protect your projects by understanding the potential threats and implementing best practices for package management.
000
Reposted by Gérald Barré
Jérôme Laban @jlaban.bsky.social · 29/11/2024
Reposting this article for visibility from @meziantou.net, which contains how to get syntax highlighting for a string that contains C# code. I'm always forgetting how to write this :) #dotnet #roslyn
2175