Installing .NET 5 using winget, the Windows Package Manager

See how to use the Windows Package Manager, winget, to download and install .NET 5.

Tobias Zimmergren
Tobias Zimmergren

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.



Tobias Zimmergren Twitter

Hey, I'm Tobias! I write about my experiences in designing, architecting, securing, and operating distributed cloud services. Nice to meet you ๐Ÿ‘‹

Reactions and mentions

Hi, I'm Tobias ๐Ÿ‘‹

Tobias Zimmergren profile picture

Find out more about me.

Recent comments

Recommended books!

Prepare for the AZ-500 exam!
Exam Ref AZ-500 Microsoft Azure Security Technologies
Azure Security Handbook!
Azure Security Handbook: A Comprehensive Guide for Defending Your Enterprise Environment
Prepare for the SC-900 exam!
Exam Ref SC-900 Microsoft Security, Compliance, and Identity Fundamentals