Daily DevOps & .NET - Where Code Meets Culture

Opinionated .NET, Azure and DevOps engineering. Hard-won lessons from production, no tutorials.

Structured Logging Patterns That Actually Survive Production

Structured Logging Patterns That Actually Survive Production

Every pattern here addresses a failure mode I have either shipped or inherited. Source generators on hot paths, scope opt-in per provider, end-to-end correlation ID propagation, log levels as an ops contract, sink selection as an architecture decision, and OpenTelemetry Logs for greenfield services: six concrete changes that make structured logging trustworthy in production.
TimeProvider Test Patterns That Hold Up in CI and Production

TimeProvider Test Patterns That Hold Up in CI and Production

FakeTimeProvider gives you a clock you control. That solves the easy 30%. The hard part is everything that interacts with that clock: async callbacks, PeriodicTimer, CancellationTokenSource.CancelAfter, BackgroundService loops, and DI lifetime traps that turn deterministic bugs into apparently flaky tests.
Standardize or Drift: One Defaults Package for All Your Solutions

Standardize or Drift: One Defaults Package for All Your Solutions

Directory.Build.props drift is the quiet tax every multi-repo .NET org pays. NetEvolve.Defaults ships MSBuild properties, .editorconfig, NuGet Audit, and ten Roslyn diagnostics as a private-asset NuGet package. Bump the version once, every repo gets the upgrade.
.NET 11: The STS Release With C# 15 Union Types and Runtime-Async

.NET 11: The STS Release With C# 15 Union Types and Runtime-Async

STS releases are supposed to be quiet bridges to the next LTS. .NET 11 is not. The union keyword landed in Preview 2, runtime-async is now the default for the BCL and ASP.NET Core shared framework, System.Diagnostics.Process ships a major overhaul, and EF Core gains approximate vector search against SQL Server 2025. All facts sourced from the .NET repositories.
TUnit.Mocks: No Castle, No Reflection, No Drama

TUnit.Mocks: No Castle, No Reflection, No Drama

Most .NET test projects rely on NSubstitute and Castle.DynamicProxy. That foundation is cracking: NativeAOT breaks it, trimming strips it, cold-start costs accumulate. TUnit.Mocks takes a different route: a source generator emits typed mocks at compile time, IService.Mock() (or Mock.Of<T>()) is the entry point, runtime reflection is gone.