Implementing RFC-compliant HTTP caching for HttpClient in .NET

 
 
  • Gérald Barré
HTTP caching is one of the most effective ways to improve application performance by reducing network traffic, minimizing server load, and decreasing response times. While browsers automatically implement HTTP caching, the same isn't true for HttpClient in .NET, which processes every request independently without built-in caching support. This post shows how to add standards-compliant HTTP caching to… [read more]

Visualize GitHub Actions runs with Meziantou.GitHubActionsTracing

 
 
  • Gérald Barré
I recently released Meziantou.GitHubActionsTracing, a tool that converts GitHub Actions workflow runs into trace data. This post shows how to use it to debug slow or flaky CI pipelines with timeline-based analysis instead of relying on raw logs alone. Why GitHub Actions runs are hard to diagnose GitHub Actions logs are great for understanding what happened, but not for quickly seeing where time is spent.… [read more]

Creating case-sensitive folders on Windows using C#

 
 
  • Gérald Barré
Windows has long supported case-sensitive file operations, but the feature was not easily accessible or enabled by default. Since Windows 10 (version 1803), case sensitivity can be enabled on a per-directory basis. This feature was introduced primarily to support the Windows Subsystem for Linux (WSL), but any application can take advantage of it. This post covers how to enable case sensitivity for a… [read more]

Reserved filenames on Windows (CON, PRN, AUX, NUL...)

 
 
  • Gérald Barré
Windows has a set of reserved filenames that cannot be used for files or folders. These names are reserved for legacy reasons, dating back to DOS. If you try to create a file or folder with one of these names, you will get an error. The list of reserved names is: CON, PRN, AUX, NUL COM0 through COM9 LPT0 through LPT9 These names originate from DOS, where devices were exposed as special file-like names.… [read more]

Validating PowerShell script syntax in GitHub Actions workflows

 
 
  • Gérald Barré
When writing GitHub Actions workflows, it is generally recommended to keep your scripts in separate files and reference them using the path attribute of the run step. This allows you to lint and test your scripts easily using standard tools. However, this approach is not always practical. For instance, when creating a reusable workflow or a simple action, you might prefer to keep everything in a single… [read more]

Getting more information in MSBuild binlogs with property tracking

 
 
  • Gérald Barré
MSBuild binary logs (binlogs) are a powerful tool for diagnosing build issues. If you're not familiar with binlogs, Exploring a MSBuild binary log using the binary log viewer is a good starting point; Stop using diagnostic verbosity in MSBuild explains why binlogs are a better alternative to diagnostic verbosity. By default, binlogs capture extensive build information, but you can get even more detail… [read more]

Retrieve method source file location at runtime using Portable PDBs in .NET

 
 
  • Gérald Barré
When debugging or logging, you often need to know where a method is defined in your source code. While .NET provides caller information attributes like [CallerMemberName], [CallerFilePath], and [CallerLineNumber], these only work at compile-time and require you to add parameters to your methods. What if you want to retrieve source file information for any method at runtime? One use case is… [read more]