Blog
Updating an AWS Lambda app to .NET 6.0
The long awaited support for .NET 6.0 on AWS Lambda has finally been released. My Twitter bot runs on .NET Core 3.1 in a Lambda function and I have been meaning to update it to .NET 6 for a while. So let’s do just that!
I’ll be following the steps on the announcement blog post to migrate to 6.0.
Project file The following items need to be updated in the project file:
Blog
Develop ASP.NET Core web apps faster with Dev Container
Developing ASP.NET Core web apps with MS SQL Server databases on macOS is not very straightforward, as I’ve blogged about before. There’s lots of custom scripts needed and it’s complicated for a new developer to get started in a project like this. My current project Gig Local had this very problem, so I decided enough was enough, and went all in with Dev Containers to make local development easier.
In this post, I’ll walk through how to configure a Dev Container to develop an ASP.
Blog
Deploying a spam filter with Snorkel, scikit-learn and ONNX Runtime
I created the .NET Twitter Bot in January 2020 and it has been running ever since, amassing a decent following with over 2,000 followers at the time of writing this post. The bot was initially setup to simply search for #dotnet related tweets every 30 minutes and retweet them. As you can imagine, with such a simple bot, it was sometimes retweeting tweets that were not related to .NET at all.
Blog
Setting themes, fonts and icons in Windows Terminal
I’ve been using Windows Terminal more and more over the past couple of months, and have really come to love it. This is a quick post on how to customise it with a theme, fonts and icons.
Disclaimer: I’m completely ripping off Kayla Cinnamon’s video, but thought I’d put it into writing so it’s easier to find and use.
Step 1: Install Windows Terminal If you haven’t already got Windows Termianl, the recommended way to install it is via the Microsoft Store.
Blog
Build and publish Docker images with GitHub Packages
GitHub has been evolving rapidly in the last few years. With the introduction of GitHub Actions and GitHub Packages, your continuous integration (CI) pipelines can be entirely implemented without leaving GitHub, reducing context switching and increasing productivity for engineers. In this post, we will work through setting up pipelines for a Docker based project including pull request (PR) validation, CI, publishing of CI images and publishing of release images, all in GitHub.
Blog
Serverless image classification with ONNX, .NET and Azure Functions
The Open Neural Network Exchange (ONNX) format, released in 2017, is a portable file format for describing machine learning models. ONNX models are self-contained files (.onnx) that can be easily exported from all the major training frameworks and are supported by many hardware architectures and operating systems enabling improved efficiency at inference time. The ONNX Runtime in particular, developed in the open by Microsoft, is cross-platform and high performance with a simple API enabling you to run inference on any ONNX model exactly where you need it: VM in cloud, VM on-prem, phone, tablet, IoT device, you name it!
Blog
Develop against SQL Server on a Mac with Docker and VS Code
Developing and testing web apps that target Microsoft SQL Server are a breeze on Windows because you can leverage SQL Server Express LocalDB. This is not the case when developing on a Mac as LocalDB or SQL Server full are not available natively. The options are then to either target a remote database, either on-prem or cloud, which quickly becomes expensive and pushes out the inner loop development time. Another option could be to use SQLite when in development, as this is supported on a Mac, but then you risk having unforeseen problems when deploying to production as the two databases are not equivalent.
Blog
Creating a .NET Tool - Part 3: CI/CD
In Part 2 of this series, we added the necessary code to package the console app as a .NET Tool that can be published to NuGet. In this post, we’re going all in on the DevOps, including pull request validation, publishing a CI package and publishing a Release package.
Note: I’ve gone ahead and added some tests so our CI/CD has something to test, so the main program looks slightly different compared to the first two posts, but hopefully not too much!
Blog
Creating a .NET Tool - Part 2: Packaging
In Part 1 of this series, we created a command line program that can validate JSON files on disk, utilising System.CommandLine.DragonFruit for command line parsing and System.Text.Json for JSON validation. In this post, we’ll add the necessary code to package the console app as a .NET Tool that can be published to NuGet. Let’s jump right in!
Pack as tool .NET Tools are by all accounts just regular NuGet packages, except they have special tags in their metadata.
Blog
Creating a .NET Tool - Part 1: Feeding the Dragon
I’ve been using .NET Tools more and more recently; once you have .NET on your system, they’re so easy to install with just one command line call and are immediately available on the path. But how does one actually create a tool and make it available? I thought I’d do a series on how to authour a tool and make it available for public installation.
Let’s jump right in!
Requirements The tool I’m creating is a simple JSON validator: you point it to a JSON file on disk and it returns whether the file is valid JSON or not.