rendle.dev

Mark Rendle's .NET development blog.

Creating a dotnet tool

Building, packaging and publishing a `dotnet` tool via NuGet

9-Minute Read

One of the great features of .NET Core is that it gives you a simple way to create and distribute CLI tools via NuGet. You just create a Console application, add a few entries to the .csproj file, and publish it to NuGet. Then other people can install it with the dotnet tool install command. I’ve published a couple of tools this way before, but I’ve just published another one so I thought I’d take time to describe the steps involved, as well as a handful of neat NuGet packages…

Using Channel Like IAsyncEnumerable

How System.Threading.Channels can be used like IAsyncEnumerable in older .NET versions

2-Minute Read

Ironically, as I am creating a Visual Studio extension that migrates .NET 4.x code to .NET Core 3.1, I find myself mainly coding with .NET 4.7.2 and C# 7.3. While it is technically possible to use a subset of C# 8 features outside of .NET Core 3.x, the VS SDK is a difficult beast and introducing it to new things often makes it unhappy. I’ve lost an afternoon tracking down a reference to System.Collections.Immutable that was upsetting it.

Recent Posts

categories

About

Mark Rendle's blog about making software and stuff.