Recently I talked about the new winget package manager for Windows 10.

Today I'm showing how to install .NET 5 using winget. This comes in handy, seeing how I'm moving more things over to using the Windows Package Manager. I hope you can benefit from this short tip.

Download and install .NET 5

There are different ways to install .NET 5, as with most software.

Download the binaries or setup files directly

You can go to the following url to grab the latest release directly:

Using the Windows Package Manager, winget

Here's how to find and install the latest version of .NET 5 using winget:

First, search for the available packages:

winget search .net

This will show you what it found, and their currently released latest versions:

Searching for .NET 5 using winget.

I'll install .NET 5 using the package manager, but you can, as I mentioned above, download it directly from the release page if that makes things easier.

Because there are multiple items matching "Microsoft.dotnet*", I will specify the additional -e parameter, indicating I'm looking for an exact match. I am also adding the exact version I want to install, using the -v parameter:

winget install Microsoft.dotnet -e -v 5.0.100-preview.4
Installing .NET 5 using the winget package manager.

Voila. We have the latest version of .NET 5 installed.

winget to the rescue again. Next time there's an updated version available, I can upgrade using winget.

Neat.