From meziantou.net
Using Roslyn to analyze and rewrite code in a solution - Gérald Barré
0 4
In this post, I describe how to use Roslyn as a library to analyze and rewrite code in a solution.
on Mon, 1PM
From meziantou.net
HSTS for HttpClient in .NET - Gérald Barré
0 0
In this post, I describe how to create an HttpClient that automatically upgrade requests to https based on HSTS preload list and response header.
on Jan 13
From meziantou.net
Supporting Hot Reload in your .NET application - Gérald Barré
0 1
In this post, I describe how to support the new hot reload functionality in your .NET application.
on Jan 10
From meziantou.net
Exploring CollectionsMarshal for Dictionary - Gérald Barré
0 0
In this post, I explore how to use the CollectionsMarshal class to efficiently add or update key-value pairs in a Dictionary.
on Jan 6
From meziantou.net
Publishing a NuGet package using GitHub and GitHub Actions - Gérald Barré
0 0
In this post, I describe how .NET developers can use GitHub and GitHub Actions to publish a NuGet package that respect best practices.
on Jan 3
From meziantou.net
Improve the tree view settings in Visual Studio Code - Gérald Barré
0 0
In this post, I describe how to improve the tree view settings in Visual Studio Code to improve readability
on Dec 31
From meziantou.net
Signing commits in Git using SSH keys on Windows - Gérald Barré
0 0
In this post, I describe how to sign commits in Git using SSH keys on Windows.
on Dec 30
From meziantou.net
Reading USN Journal with .NET - Gérald Barré
0 0
In this post, I describe how to read the USN Journal with .NET.
on Dec 23
From meziantou.net
Generating SBOM for NuGet packages - Gérald Barré
0 0
In this post, I describe how to easily generate a Software Bill of Materials (SBOM) for NuGet packages.
on Dec 16
From meziantou.net
How to write logs from ILogger to xUnit.net ITestOutputHelper - Gérald Barré
0 1
In this post, I describe how to view the logs of an application under test using a xUnit implementation of ILoggerProvider in .NET.
on Dec 11
From meziantou.net
Using the binary log to find the source of a .NET dependency - Gérald Barré
0 0
In this post, I describe how to use the binary log and MSBuild Structured Log Viewer to find the source of a .NET dependency.
on Dec 10
From meziantou.net
Executing code before Main in .NET - Gérald Barré
0 0
In this post, I describe how to execute code before the Main method in a .NET application.
on Dec 6
From meziantou.net
NuGet Packages: security risks and best practices - Gérald Barré
0 0
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...
on Dec 2
From meziantou.net
Update dependencies in nuspec file using Renovate - Gérald Barré
0 0
In this post, I describe how to use Renovate to update NuGet dependencies in nuspec files.
on Nov 25
From meziantou.net
Embeded languages in string values supported by Roslyn - Gérald Barré
0 0
In this post, I describe which languages are supported in string values by Roslyn, which powers Visual Studio, Visual Studio Code, and some other tools.
on Nov 18
From meziantou.net
Stop using diagnostic verbosity in MSBuild - Gérald Barré
0 0
In this post, I describe why you should stop using the diagnostic verbosity in MSBuild and how to use the binary log feature of MSBuild to get the same information in a more efficient way.
on Nov 11
From meziantou.net
Understanding OverloadResolutionPriority attribute in C# 13 - Gérald Barré
0 0
In this post, I describe what the OverloadResolutionPriority attribute is and what's the main use case for this new attribute.
on Oct 17
From meziantou.net
Disabling HSTS for localhost using a browser extension - Gérald Barré
0 0
In this post, I describe how to disable HSTS on localhost by using a browser extension for chromium-based browers.
on Oct 1
From meziantou.net
Using Mutex<T> to synchronize access to a shared resource - Gérald Barré
0 0
In this post, I describe how to create a class Mutex<T> to synchronize access to a shared resource in .NET.
on Sep 24
From meziantou.net
Waiting for a ManualResetEventSlim to be set asynchronously - Gérald Barré
0 0
In this post, I describe how to wait for a ManualResetEventSlim to be set asynchronously.
on Sep 17
From meziantou.net
Stop a script when an error occurs in PowerShell - Gérald Barré
0 0
In this post, I describe how to stop a PowerShell script when an error occurs using the $ErrorActionPreference and $PSNativeCommandUseErrorActionPreference variables
on Jul 23
From meziantou.net
Enable NuGet auditing for your .NET projects - Gérald Barré
0 0
In this post, I describe how to enable NuGet auditing for your .NET projects to increase the security of your projects.
on Jul 16
From meziantou.net
How to test a Roslyn analyzer - Gérald Barré
0 0
In this post, I describe how to test a Roslyn analyzer using the Roslyn SDK NuGet packages.
on Jul 12
From meziantou.net
How to output a SARIF file from a .NET project - Gérald Barré
0 0
In this post, I describe how to output a SARIF file from a .NET project. The SARIF file contains the result of the compilation, including Roslyn analyzers.
on Jul 2
From meziantou.net
Sharing the Renovate configuration across multiple projects - Gérald Barré
0 0
In this post, I describe how to share the Renovate configuration across multiple projects.
on Jun 23
From meziantou.net
Create a multi-arch Docker image for a .NET application - Gérald Barré
0 0
In this post, I describe how to create a multi-arch Docker image for a .NET application. The image will be built for x64 and ARM64 architectures.
on Jun 5
From meziantou.net
Using type aliases to make code clearer with generics - Gérald Barré
0 0
In this post, I describe how to use type aliases in C# to make code clearer when using generic types such as Dictionary<TKey, TValue>.
on Apr 23
From meziantou.net
Computing code coverage for a .NET project - Gérald Barré
0 0
In this post, I describe how to compute code coverage for a .NET project using only the .NET SDK
on Apr 16
From meziantou.net
Creating ico files from multiple images in .NET - Gérald Barré
0 0
In this post, I describe how to create an ico file from a list of images in .NET
on Apr 9
From meziantou.net
Json schema validation in .NET - Gérald Barré
0 0
In this post, I describe how to validate JSON data against a JSON schema in .NET.
on Apr 2
From meziantou.net
Convert DateTime to user's time zone with Blazor in .NET 8 - Gérald Barré
0 0
In this post, I describe how to convert DateTime to the user's time zone with server-side Blazor using the new TimeProvider class.
on Mar 26
From meziantou.net
Generate OpenAPI specification at build time from the code in ASP.NET Core - Gérald Barré
0 0
In this post, I describe how to generate the OpenAPI specification from the code in ASP.NET Core at build time, so you can validate the file during code reviews
on Mar 19
From meziantou.net
Set a blank page for new tabs in Microsoft Edge - Gérald Barré
0 0
In this post, I describe how to set a blank page for new tabs in Microsoft Edge using a registry key to set the policy.
on Mar 12
From meziantou.net
Getting all exceptions thrown from Parallel.ForEachAsync - Gérald Barré
0 0
In this post, I describe how to get all exceptions thrown from Parallel.ForEachAsync in .NET.
on Feb 21
From meziantou.net
Creating an HttpClient that uses DNS over Https - Gérald Barré
0 0
In this post, I describe how to create an HttpClient that uses DNS over Https (DoH) in .NET.
on Feb 13
From meziantou.net
Enable the new TerminalLogger in .NET 8 SDK automatically - Gérald Barré
0 0
In this post, I describe how to enable the new TerminalLogger in .NET 8 SDK automatically
on Feb 6
From meziantou.net
Checking if a collection is empty in C# - Gérald Barré
0 0
In this post, I describe how to check if a collection is empty in C#, whatever the type of the collection
on Jan 30
From meziantou.net
How to get assembly code generated by the JIT for a C# method - Gérald Barré
0 0
In this post, I describe how you can inspect the JIT-generated assembly code of a C# method using the DOTNET_JitDisasm environment variable or other tools.
on Jan 24, 2024
From meziantou.net
Difference between CultureInfo.Get and new CultureInfo - Gérald Barré
0 0
In this post, I describe how to get a CultureInfo object and the difference between CultureInfo.Get and new CultureInfo in .NET.
on Jan 23, 2024
From meziantou.net
Making primary constructor parameters read-only - Gérald Barré
0 0
In this post, I describe how to ensure primary constructor parameters (C# 12) are read-only using a Meziantou.Analyzer, a Roslyn Analyzer.
on Jan 20, 2024
From meziantou.net
Removing history versions of a file on OneDrive for Business - Gérald Barré
0 0
In this post, I describe how to remove history versions of a file on OneDrive for Business to free up space.
on Dec 12, 2023
From meziantou.net
Inline Snapshot testing in .NET - Gérald Barré
0 0
In this post, I describe how to use Inline Snapshot testing in .NET. Inline Snapshot testing is a technique that allows you to write tests that assert the output of a method or function. The output is stored in a snapshot file. The next time the test is run, the output is compared to the...
on Dec 6, 2023
From meziantou.net
How to monitor changes on a website - Gérald Barré
0 0
In this post, I describe how to be notified when a change on a website occurs using a ChangeDetection.io and their docker containers
on Nov 28, 2023
From meziantou.net
Embedding additional files in an MSBuild binary log file - Gérald Barré
0 0
In this post, I describe how to embed additional files in an MSBuild binary log file to help to diagnose builds using a binlog file.
on Nov 21, 2023
From meziantou.net
Removing allocations by reducing closure scopes using local variables - Gérald Barré
0 0
In this post, I describe how to avoid allocations when using closures by scoping captured variables. It provides examples and demonstrates the compiler's code transformation.
on Nov 14, 2023
From meziantou.net
Reading a stream of JsonDocuments separated by new lines (ndjson) - Gérald Barré
0 0
In this post, I describe how to read a stream of JsonDocuments separated by new lines in .NET.
on Nov 7, 2023
From meziantou.net
Customizing the behavior of record copy constructors - Gérald Barré
0 0
In this post, I describe how to customize the behavior of the record copy constructor to clone an instance when using the with keyword.
on Oct 24, 2023
From meziantou.net
Customizing the name of embedded resources in .NET - Gérald Barré
0 0
In this post, I describe how to customize the name of embedded resources in .NET, so you can use a name that matches the file hierarchy.
on Oct 17, 2023
From meziantou.net
Get the default value of a type at runtime - Gérald Barré
0 0
In this post, I describe how to get the default value of a type at runtime in .NET.
on Oct 10, 2023
From meziantou.net
How to test the logs from ILogger in .NET - Gérald Barré
0 0
In this post, I describe how to unit test ILogger in .NET Core or ASP.NET Core using Meziantou.Extensions.Logging.InMemory.
on Oct 3, 2023