Install Microsoft .NET with the Windows Package Manager winget

Martin Brinkmann
Sep 14, 2022
Windows 11 News
|
3

Windows administrators may use the Windows Package Manager winget to install supported Microsoft .NET applications.

winget net install

Microsoft released Windows Package Manager 1.0 back in 2021, opening it up for use on production machines. The command line tool may be used to install and uninstall software programs on Windows, and to update them.

Tip: Check out our guide on running Windows Package Manager to update all installed Windows programs at once.

ADVERTISEMENT

Windows users who prefer graphical user interface may take a look at Winstall or WingetUI, which offer that.

.NET now on Windows Package Manager

Administrators may use winget to install .NET offerings without having to worry about dependencies or configurations. The Windows Package Manager supports the following versions currently:

  • Microsoft .NET runtimes (3.1, 5.0, 6.0, 7.0 (Preview))
  • Microsoft .NET SDKs (3.1, 5.0, 6.0, 7.0 (Preview))
  • Microsoft .NET Framework 4.8
  • Microsoft .NET Core SDK Uninstall Tool

Winget is bundled with recent versions of Windows and Windows 11, but it is also available on GitHub and the Microsoft Store.

Open a command prompt window and run the following command to check the available .NET packages:

winget search Microsoft.DotNet

Running the command displays the available packages.  Each package is listed with its name and version. Installation of a package works exactly as the installation of other software when using winget.

winget install <package-id>

The package ID is listed as one of the values when you run the search for available Microsoft.DotNet components. To give you an example: to install the Microsoft .NET Runtime 3.1 on the device, you'd run the following command.

winget install Microsoft.DotNet.Runtime.3_1

Uninstallation of a Microsoft .NET package is straightforward as well.

winget uninstall <package-id>

One of winget's best features is the ability to upgrade packages; this is true for Microsoft .NET also. Just run winget upgrade to display all packages for which updates are available.  The command below will update the specified component:

winget upgrade <package-id>

As always, the handy winget upgrade -all command is available to update all software packages for which updates are available. Checking the available updates before running the -all command is recommended, as you may not want all of them to be updated at the moment in time.

Closing Words

While there are other methods to install .NET components on Windows, winget is offering a straightforward option to install and update .NET components on Windows.

Now You: which .Net versions do you have installed on your devices? (via Deskmodder)

Summary
Install Microsoft .NET with the Windows Package Manager winget
Article Name
Install Microsoft .NET with the Windows Package Manager winget
Description
Windows administrators may use the Windows Package Manager winget to install supported Microsoft .NET applications.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Anonymous said on September 14, 2022 at 11:38 pm
    Reply

    You can use -s winget at the end, so it will only search for winget repository and not the Store one, especially if you don’t want to agree to the terms of Store and you don’t want to say No all the time.

    Winget is pretty good, I use it also to notify me about updates even if I decide to manually update my programs for any setting I need to cover that silent installations might ignore or apply.

    Few days ago I saw someone struggling installing redis c++ on a stream, so it would have been easier just to say ‘use winget’ and done.

  2. PhobeMusk said on September 15, 2022 at 1:28 am
    Reply

    I solely used winget to install StartAllBack and remove all of the junk that comes with Windows.

  3. John G. said on September 15, 2022 at 4:59 pm
    Reply

    The only .NET needed is 6.0.x that is the latest LTS version.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.