Docker build with private NuGet feed in Azure Artifacts

While trying to containerise a .NET Framework app I hit a problem while trying to restore packages from NuGet that were from a private NuGet feed. The container didn't know my credentials, so the feed was rightly responding with "401 (Unauthorized)".

Here's how I used Azure Artifacts Credential Provider with Windows Containers to solve it.

Create Wordpress Category Widget in Gatsby

I've recently moved this blog from WordPress to Gatsby. So far, I'm very happy with the move, but I missed a couple of the things WordPress gave me out of the box. One of those things were the various widgets you can add to the sidebar.

In particular, I missed the Category Widget. This is how I recreated it.

Persist the azure cli docker container credentials

I've been using Docker for more development tasks recently. Pulling a new pre-configured image and getting on with what I'm trying to do saves a lot of time. I've lost count of the number of hours I've "lost" chasing version numbers. Downloading files, installing them and then figuring out why it doesn't work isn't fun. When I read you can run the Azure CLI in a Docker container, I decided to use it.

However, authenticating with `az login` every time got old quick. Here's how I managed to persist the azure cli docker container credentials between sessions.

How To Use Roslyn CodeFix to add a ToString method

I recently had the opportunity to update the quality of logging in an application. Exceptions were handled well, but it was hard to see the values passed through the layers.

I ended up using a Roslyn CodeFix to add a ToString method.