In this post I describe some of the complexities around authoring .NET tools, specifically around supporting multiple .NET runtimes and testing in CI| Andrew Lock | .NET Escapades
In this post I walk through the process of solving a native library loading issue on alpine with an old .NET runtime, showing the steps we took and the solution| Andrew Lock | .NET Escapades
In this post I discuss the new TUnit testing framework, why I ported one of my libraries to use it instead of xUnit and related issues I had to deal with| Andrew Lock | .NET Escapades
In this post I show how to run .NET in your browser without using Blazor, and instead rely on lower-level abstractions provided by [JSImport] and [JSExport]| Andrew Lock | .NET Escapades
In this post I describe how to configure the URLs your application binds to when using Kestrel or the WebListener HTTP servers| Andrew Lock | .NET Escapades
In this post I look at the passkey support added to ASP.NET Core Identity and the Blazor Web App template, explore how it works, and look at the implementation| Andrew Lock | .NET Escapades
In this post I show the new dnx command for running .NET tools without installing them and look at exactly how it works.| Andrew Lock | .NET Escapades
In this post I discuss a new source generator API, AddEmbeddedAttributeDefinition(), added in .NET 10, which makes it easier to embed generated attributes| Andrew Lock | .NET Escapades
In this post I look at the C#14 extension members feature. I show how to convert extension methods to the new syntax and how to add new types of extension.| Andrew Lock | .NET Escapades
In this post I investigate how to create a 'pooled' dependency injection scope that automatically pools services between multiple requests| Andrew Lock | .NET Escapades
In this post I describe the recent major changes to NetEscapades.AspNetCore.SecurityHeaders, a NuGet package for adding security headers to your apps.| Andrew Lock | .NET Escapades
In this post I look at the git range-diff feature, show what it's for and how it works, explain the output format, and demonstrate it with a toy scenario| Andrew Lock | .NET Escapades
In this post I show how you can create attestations for SBOM documents that you have created for your application or Nuget package| Andrew Lock | .NET Escapades
In this post I discuss several tools you can use to create a software bill of materials (SBOM) for an application or a NuGet package| Andrew Lock | .NET Escapades
In this post I discuss software provenance, what attestations say about your software, how they work, and how to create an attestation for a NuGet package| Andrew Lock | .NET Escapades
In this post I describe how the Trusted Types Content-Security-Policy feature can protect you against cross-site-scripting attacks.| Andrew Lock | .NET Escapades
Hi, my name is Andrew, or ‘Sock’ to most people. This blog is where I share my experiences as I journey into ASP.NET Core.| Andrew Lock | .NET Escapades
In this post I look at the updates to the source generator API in .NET 6, why the changes were made, and how to update your source generators to use them.| Andrew Lock | .NET Escapades
In this post I described how I tried (and failed) to add an interceptor for Enum.ToString(), due to a bug in the Roslyn compiler.| Andrew Lock | .NET Escapades
In this post I looks at how the new single-file .NET run experience is implemented inside the .NET SDK, focusing on how the virtual-project file is built| Andrew Lock | .NET Escapades
In this post I discuss the new single-file .NET run experience, in which you can run a C# file directly, without needing a csproj project file| Andrew Lock | .NET Escapades
In this post looking at stacked branches I describe how to handle scenarios such as merging one of your stacked branches and handling changes to main| Andrew Lock | .NET Escapades
In this post I describe why I like to use stacked branches and stacked PRs for larger features, and how I handle making changes to commits in the stack| Andrew Lock | .NET Escapades
In this post I describe how I took a Microsoft XNA 3.1 game from 15 years ago and converted it to use MonoGame on .NET 8 in just a few hours| Andrew Lock | .NET Escapades
In this post I provide an introduction to MonoGame, looking at it's history, the requirements for building with MonoGame, and finally a first sample app.| Andrew Lock | .NET Escapades
In this post I describe how I converted the deployment method of the mailing-list manager lismonk from a docker-compose.yml file to an Aspire app host project| Andrew Lock | .NET Escapades
In this post I show how you can push push a whole stack of branches with a single command using a Git alias: git push-stack| Andrew Lock | .NET Escapades
In this post I use the new Microsoft's new .NET AI template to ingest the contents of a website and create a chatbot that can answer questions with citations| Andrew Lock | .NET Escapades
In this post I describe 5 different ways to set which URLs your ASP.NET Core application listens on.| Andrew Lock | .NET Escapades
In this post I explore the new .NET AI Chat Web App template (currently in preview) and take a brief look at the implementation it provides| Andrew Lock | .NET Escapades
In this post I investigate some 'experimental' dependency injection scopes that provide additional features over Singleton, Scoped, and Transient| Andrew Lock | .NET Escapades
In this post I show how to emit your source generator output to disk, so you can include it in source control and code reviews.| Andrew Lock | .NET Escapades
In this post I describe the experimental interceptor support in NetEscapades.EnumGenerators that replaces ToString() calls with ToStringFast() automatically| Andrew Lock | .NET Escapades
In this post I discuss how to use the new Git rebasing feature, --update-refs, and how it makes working with stacked branches/PRs easier.| Andrew Lock | .NET Escapades
In this post I describe how to solve Error CS0433, where you have two types with the exact same name and namespace coming from two different packages| Andrew Lock | .NET Escapades
In this post I look at the code generated when you use collection expressions with List or with types that can be used with collection initializers| Andrew Lock | .NET Escapades
In this post I introduce C#12 primary constructors, describe the various ways to use them and how they work behind the scenes.| Andrew Lock | .NET Escapades
In this post I show how .NET's PriorityQueue implements its methods and relate these methods to operations on a min-heap data structure| Andrew Lock | .NET Escapades
In this post I provide an introduction to the heap data structure, describe why it's useful, and show how it's used in .NET's PriorityQueue type.| Andrew Lock | .NET Escapades
In this post I show how to create an ASP.NET Core server that listens using Windows Named Pipes, and how to call the server using an HttpClient| Andrew Lock | .NET Escapades
In this post I describe 8 different ways to set which URLs your ASP.NET Core application listens on.| Andrew Lock | .NET Escapades
In this post I provide an introduction to default interface methods, how they work at a high level, their typical uses, and some of their sharp edges| Andrew Lock | .NET Escapades
In this post I describe some important things to think about when designing your incremental source generator, particularly the pitfalls to watch out for| Andrew Lock | .NET Escapades
In this post I describe the changes to .NET 8 docker files in .NET 8 including changes to images, new image types and changes to image tagging| Andrew Lock | .NET Escapades
In this post I look at the C#12 feature, interceptors. I show how and why they're useful, and how the ASP.NET Core minimal API source generator uses them| Andrew Lock | .NET Escapades
In this post I take a look at the new minimal API source generator added in .NET 8 preview 3 to support AOT, and explore the code it generates.| Andrew Lock | .NET Escapades
In this post I introduce the new configuration binder source generator added in .NET 8 preview 3, explore how it works, and how to use it in your apps.| Andrew Lock | .NET Escapades
In this post I discuss the Ahead of Time (AOT) compilation coming in .NET 8, look at it's benefits and limitations, and look at the new AOT template| Andrew Lock | .NET Escapades