Content by Andrew Lock (46)
Andrew Lock explains recent architectural changes to the NetEscapades.EnumGenerators package family, guiding .NET developers on choosing the right flavor for their scenario and sharing lessons from evolving the popular source generator library.
Andrew Lock explores how to collect and process application metrics in .NET using MeterListener from System.Diagnostics.Metrics. He explains the MetricManager pattern, in-process aggregation, and visualizing metrics with Spectre.Console.
Andrew Lock provides a deep dive into the various instrument types featured in the System.Diagnostics.Metrics API. The article explores practical examples from .NET libraries and ASP.NET Core to illustrate how developers can record and observe metrics in their applications.
Andrew Lock provides a comprehensive walkthrough on leveraging System.Diagnostics.Metrics APIs in .NET, guiding developers through instrumentation concepts, monitoring with dotnet-counters, and building custom metrics for production-grade observability.
Andrew Lock explains how to make foreach iteration allocation-free on IEnumerable in .NET, leveraging Reflection.Emit and DynamicMethod for advanced memory optimization, with benchmarks and implications for earlier and modern .NET runtimes.
Andrew Lock summarizes recent improvements to the NetEscapades.EnumGenerators package, including new APIs, advanced parsing options, and System.Memory support, offering insights for .NET developers seeking faster enum operations.
Andrew Lock demonstrates how to create a simple .NET CLR profiler using C# and NativeAOT with the Silhouette library, showing how to hook into assembly load events for custom profiling.
Andrew Lock explores whether the Zed editor on Windows can replace VS Code for .NET and Markdown editing, sharing his installation experience, setup tips, feature comparisons, and impressions.
Andrew Lock explains the recent improvements to NetEscapades.EnumGenerators, a .NET source generator package, including support for [EnumMember], additional analyzers, and bug fixes. Developers gain new metadata options and guidance on edge cases.
Andrew Lock provides a technical walkthrough exploring .NET's boot process using host tracing, offering developers step-by-step insights into muxer, hostfxr, and hostpolicy.dll components.
Andrew Lock reviews the .NET support lifecycle and demonstrates how organizations can avoid risks from unsupported versions by leveraging HeroDevs' Never Ending Support for .NET 6.
Andrew Lock demonstrates improvements to the [UnsafeAccessor] mechanism in .NET 10, focusing on how [UnsafeAccessorType] enables accessing private fields and methods for types without direct references.
Andrew Lock provides an in-depth technical breakdown of the ASP.NET Core CVE-2025-55315 vulnerability, explaining request smuggling, exploitation avenues, and steps for developers to remain secure.
Andrew Lock delves into the quirks of applying metadata to fallback endpoints in ASP.NET Core, providing guidance on best practices for minimal APIs, MVC, and Razor Pages.
Andrew Lock walks through using nuget.org’s Trusted Publishing to publish NuGet packages from a GitHub Actions workflow without storing long-lived API keys, using OIDC token exchange and a nuget.org trust policy to improve publishing security.
Andrew Lock details the development of 'sleep-pc,' a native AOT .NET tool for putting Windows PCs to sleep after a timeout, highlighting his approach, toolchain choices, and packaging for NuGet.
Andrew Lock provides a thorough guide on leveraging the new .NET 10 platform-specific tool features, highlighting technical strategies and trade-offs for maintaining compatibility with older .NET SDKs.
Andrew Lock details how .NET 10 preview improves .NET tool packaging for NuGet with new self-contained and native AOT deployment options, uncovering benefits, limitations, and practical tips for developers.
Andrew Lock explores the complexities of authoring and managing .NET tools, offering practical advice on runtime targeting, manifest management, and CI testing for developers.
Andrew Lock walks through the real-world debugging process for a library loading failure on Alpine Linux when running older .NET Core apps, clearly explaining the steps and ultimate resolution.