I guess every .NET developer is familiar with the Path.Combine method. But, is every .NET developer using it correctly to ensure its result is cross-platform compatible? I guess no as I was one of these developers who didn't use it correctly. Did you ever see something like this? var arbitraryPath = Path.GetFullPath( Path.Combine( AppContext.BaseDirectory, @"..\..\..\..\ArbitraryDirectory"... Continue Reading →
[HOWTO] Successfully migrate a .NET 10 test project from VSTest to Microsoft.Testing.Platform (MTP)
The author migrated a .NET 10 test project from VSTest to Microsoft.Testing.Platform due to CI/CD pipeline failures after a NuGet package update. The post details the migration process, highlighting necessary changes in the Azure DevOps pipeline and .csproj file to resolve errors and achieve successful test runs in both Visual Studio and the Azure DevOps YAML pipeline.
[HOWTO] Implement Audit Logging in a .NET Core application using Entity Framework Core and Audit.NET
This blog post outlines the implementation of audit logging using Audit.NET in .NET Core applications with Entity Framework Core. It discusses the purpose of audit logs, which enhance traceability and compliance, and details the setup process, including modifying the DbContext, creating tracking properties, and configuring audit data storage in a dedicated entity.
[Headache Prevention] Workaround for the error “Could not authenticate user with requested resource” when accessing the Aspire dashboard
Recently, I deployed a .NET Aspire solution to Azure Container Apps (via Azure Container Registry). The Azure Container Apps resource is running within my personal Azure tenant. In my personal tenant, my user is assigned as Owner of the corresponding resource group and therefore also Owner (by inheritance) of the Container Apps Environment which resides... Continue Reading →
[Best Practice] Make Application Configuration of ASP.NET Core applications obvious
In my work as a software developer, I have already been involved in numerous existing .NET software projects. Nearly all of these existing code bases had at least one thing in common: application configuration was not obvious. But why? Especially in the .NET ecosystem everything required to make it obvious is there. In this blog... Continue Reading →
[NoBrainer] Create git tag in a Azure DevOps YAML pipeline based on AssemblyVersion of a specific .csproj file
The content describes a process for creating a git tag in Azure DevOps after each production deployment, using the assembly version from a .NET project. It outlines a pipeline job that retrieves the version, formats it, then creates and pushes a git tag, requiring specific permissions for the build service user.
[HOWTO] Run ASP.NET Core integration tests in a Az DevOps YAML pipeline when subject under test uses DefaultAzureCredential
Last week I struggled (again) running ASP.NET Core integration tests for an ASP.NET Core Web API that uses DefaultAzureCredential in a Azure DevOps YAML pipeline. To avoid having to struggle again, I am writing down my findings here. The initial situation There was an existing ASP.NET Core (.NET 8) Web API project that uses DefaultAzureCredential... Continue Reading →
[HOWTO] Rotate Azure Key Vault secrets used by an ASP.NET Core Web API with Terraform on every deployment
The blog post details the process of rotating secrets stored in Azure Key Vault with each application deployment, utilizing Infrastructure as Code (IaC) principles via Terraform. It emphasizes the importance of secret rotation to minimize risks from leaks. An ASP.NET Core Web API is demonstrated as the application example, alongside procedural GitHub Actions for deployment.
[HOWTO] Implement offline capability for Blazor PWA using Service Worker and local storage
In spring 2024, I developed offline capabilities for a Blazor Progressive Web App consisting of a .NET Web API and Blazor WASM client. This involved storing form data in local storage when offline and syncing the data when online again. The solution uses service worker to cache necessary assets, ensuring users could access forms without an internet connection.
[Workaround] Fix Testcontainers.SQL error “Docker.DotNet.DockerApiException : Docker API responded with status code=Conflict”
Recently an error occurred in an Azure DevOps build pipeline due to a conflict with a non-running Docker container, impacting integration tests using Testcontainers.MsSql. A workaround was suggested to resolve compatibility issues on Linux by updating the Docker image used by Testcontainers.MsSql.

