Skip to main content

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.

Keep updating

November 14th, 2023: Announcing .NET 8, the latest LTS version.

November 8th, 2022: .NET 7 is Available Today

November 8th, 2021: Announcing .NET 6 — The Fastest .NET Yet

November 10, 2020: Announcing .NET 5.0

March 24, 2020: .NET Core 3.1.3

.NET SDK 3.1.201
winget install Microsoft.DotNet.SDK.8
dotnet --list-sdks

Install .NET SDK 6.0 on Windows 11

PS C:\Users\tuyen> winget install Microsoft.DotNet.SDK.6
Found Microsoft .NET SDK 6.0 [Microsoft.DotNet.SDK.6] Version 6.0.401
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.401/dotnet-sdk-6.0.401-win-x64.exe
  ██████████████████████████████   196 MB /  196 MB
Successfully verified installer hash
Starting package install...  
Successfully installed
PS C:\Users\tuyen> dotnet --version
6.0.401

Install Microsoft .NET Core SDK 3.x on Windows 10

Using powershell script to install LTS Channel

PS D:\projects\lthwmsgraph\GraphTutorial> iwr https://dotnetwebsite.azurewebsites.net/download/dotnet-core/scripts/v1/dotnet-install.ps1 -OutFile D:\software\dotnet-install.ps1
PS D:\projects\lthwmsgraph\GraphTutorial> D:\software\dotnet-install.ps1 -Channel LTS
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.102/dotnet-sdk-3.1.102-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.102/dotnet-sdk-3.1.102-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\Users\tuyen\AppData\Local\Microsoft\dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Installation finished
PS D:\projects\lthwmsgraph\GraphTutorial> dotnet --version
3.1.102

Using installer

Download link: https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-3.0.100-windows-x64-installer

.NET Core SDK 3.0 on Windows 10

Install Microsoft .NET Core SDK 2.x on Windows 10

Download link: https://download.microsoft.com/download/1/1/5/115B762D-2B41-4AF3-9A63-92D9680B9409/dotnet-sdk-2.1.4-win-gs-x64.exe
Install Microsoft .NET Core SDK
Install Microsoft .NET Core SDK 
Install Microsoft .NET Core SDK
Install Microsoft .NET Core SDK



Install Microsoft .NET Core SDK
Install Microsoft .NET Core SDK
.NET Core: Check version
.NET Core: Check version

Install .NET SDK 5.0 using winget

PS C:\Users\tuyen> winget --info
Windows Package Manager v0.2.2941 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.20246.1
Package: Microsoft.DesktopAppInstaller v1.11.2941.0

Links
--------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
PS C:\Users\tuyen> winget search dotnet
Name                      Id                                Version               Match
-------------------------------------------------------------------------------------------------
.NET SDK                  Microsoft.dotnet                  5.0.100               Moniker: dotnet
.NET Core Preview         Microsoft.dotnetPreview           5.0.100-rc.2.20479.15 Command: dotnet
reko                      uxmal.reko                        0.9.1.0               Tag: dotnet
Stride                    Stride.Stride                     5.0.1                 Tag: dotnet
Smallbasic                Microsoft.SmallBasic              1.2                   Tag: dotnet
Powershell Preview (msix) microsoft.powershell-preview-msix 7.0.2                 Tag: dotnet
Ironpython 2              Microsoft.Ironpython2             2.7.10                Tag: dotnet
.NET Core Runtime         Microsoft.dotnetRuntime           3.1.9.29323           Tag: dotnet
.Net Framework            Microsoft.dotNetFramework         4.8                   Tag: dotNet
Jchem .NET api            ChemAxon.jchemdotnetapi           20.19.0               Tag: dotnet
Unity Hub                 UnityTechnologies.UnityHub        2.4.2.0               Tag: dotnet
PS C:\Users\tuyen>

Remember to Run as Administrator

PS C:\Users\tuyen> winget install dotnet
Found .NET SDK [Microsoft.dotnet]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/2892493e-df43-409e-af68-8b14aa75c029/53156c889fc08f01b7ed8d7135badede/dotnet-sdk-5.0.100-win-x64.exe
  ██████████████████████████████   142 MB /  142 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\tuyen> dotnet --list-sdks
3.1.201 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
PS C:\Users\tuyen> dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
PS C:\Users\tuyen>

Manually install the current .NET Core SDK version on Ubuntu 18.04

Microsoft's instruction: https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current

$ sudo apt install dotnet-sdk-2.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  aspnetcore-runtime-2.2 dotnet-host dotnet-hostfxr-2.2 dotnet-runtime-2.2
  dotnet-runtime-deps-2.2 liblttng-ust-ctl4 liblttng-ust0 liburcu6
The following NEW packages will be installed:
  aspnetcore-runtime-2.2 dotnet-host dotnet-hostfxr-2.2 dotnet-runtime-2.2
  dotnet-runtime-deps-2.2 dotnet-sdk-2.2 liblttng-ust-ctl4 liblttng-ust0 liburcu6
0 upgraded, 9 newly installed, 0 to remove and 176 not upgraded.
Need to get 135 MB of archives.
After this operation, 396 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Manually install the current .NET Core SDK version on Ubuntu 18.04

Manually install the current .NET Core SDK on Debian 10

wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/debian/10/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1

Manually install the current .NET Core SDK on Kali Linux

root@T420:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2020.4
Codename:       kali-rolling
root@T420:~# 

wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/debian/10/prod.list
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

apt update
apt install apt-transport-https
apt install dotnet-sdk-3.1

root@T420:~# which dotnet
/usr/bin/dotnet
root@T420:~# dotnet --version
3.1.404

Verify after installing

Check dotnet version

$ dotnet --version
2.2.203
tuyendq@X220:~$
tuyendq@gcpfreetier-vm1:~$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.300
 Commit:    b2475c1295

Runtime Environment:
 OS Name:     debian
 OS Version:  10
 OS Platform: Linux
 RID:         debian.10-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.300/

Host (useful for support):
  Version: 3.1.4
  Commit:  0090613580

.NET Core SDKs installed:
  3.1.300 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
tuyendq@gcpfreetier-vm1:~$

Install .NET SDK 5.0 on Fedora Workstation 32

[tuyen@g73jh ~]$ cat /etc/yum.repos.d/microsoft-prod.repo
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/fedora/32/prod/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
[tuyen@g73jh ~]$
[tuyen@g73jh ~]$ sudo dnf install dotnet-sdk-5.0
[sudo] password for tuyen:
skype (stable)                                                                          6.4 kB/s | 2.9 kB     00:00
Last metadata expiration check: 0:00:01 ago on Thu 12 Nov 2020 02:19:24 PM +07.
Dependencies resolved.
========================================================================================================================
 Package                                Architecture    Version              Repository                            Size
========================================================================================================================
Installing:
 dotnet-sdk-5.0                         x86_64          5.0.100-1            packages-microsoft-com-prod           80 M
Installing dependencies:
 aspnetcore-runtime-5.0                 x86_64          5.0.0-1              packages-microsoft-com-prod          7.9 M
 aspnetcore-targeting-pack-5.0          x86_64          5.0.0-1              packages-microsoft-com-prod          2.1 M
 dotnet-apphost-pack-5.0                x86_64          5.0.0-1              packages-microsoft-com-prod          4.6 M
 dotnet-hostfxr-5.0                     x86_64          5.0.0-1              packages-microsoft-com-prod          170 k
 dotnet-runtime-5.0                     x86_64          5.0.0-1              packages-microsoft-com-prod           29 M
 dotnet-runtime-deps-5.0                x86_64          5.0.0-1              packages-microsoft-com-prod          2.8 k
 dotnet-targeting-pack-5.0              x86_64          5.0.0-1              packages-microsoft-com-prod          3.1 M

Transaction Summary
========================================================================================================================
Install  8 Packages

Total download size: 127 M
Installed size: 351 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): aspnetcore-targeting-pack-5.0.0.rpm                                              1.1 MB/s | 2.1 MB     00:01
(2/8): dotnet-hostfxr-5.0.0-x64.rpm                                                     781 kB/s | 170 kB     00:00
(3/8): aspnetcore-runtime-5.0.0-x64.rpm                                                 1.9 MB/s | 7.9 MB     00:04
(4/8): dotnet-apphost-pack-5.0.0-x64.rpm                                                1.1 MB/s | 4.6 MB     00:04
(5/8): dotnet-runtime-deps-5.0.0-fedora.27-x64.rpm                                       30 kB/s | 2.8 kB     00:00
(6/8): dotnet-targeting-pack-5.0.0-x64.rpm                                              1.0 MB/s | 3.1 MB     00:03
(7/8): dotnet-runtime-5.0.0-x64.rpm                                                     1.6 MB/s |  29 MB     00:18
(8/8): dotnet-sdk-5.0.100-x64.rpm                                                       3.0 MB/s |  80 MB     00:26
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   4.2 MB/s | 127 MB     00:30
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : dotnet-targeting-pack-5.0-5.0.0-1.x86_64                                                       1/8
  Installing       : aspnetcore-targeting-pack-5.0-5.0.0-1.x86_64                                                   2/8
  Installing       : dotnet-runtime-deps-5.0-5.0.0-1.x86_64                                                         3/8
  Installing       : dotnet-hostfxr-5.0-5.0.0-1.x86_64                                                              4/8
  Installing       : dotnet-runtime-5.0-5.0.0-1.x86_64                                                              5/8
  Installing       : aspnetcore-runtime-5.0-5.0.0-1.x86_64                                                          6/8
  Installing       : dotnet-apphost-pack-5.0-5.0.0-1.x86_64                                                         7/8
  Installing       : dotnet-sdk-5.0-5.0.100-1.x86_64                                                                8/8
  Running scriptlet: dotnet-sdk-5.0-5.0.100-1.x86_64                                                                8/8
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Welcome to .NET!
---------------------
Learn more about .NET: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.

  Verifying        : aspnetcore-runtime-5.0-5.0.0-1.x86_64                                                          1/8
  Verifying        : aspnetcore-targeting-pack-5.0-5.0.0-1.x86_64                                                   2/8
  Verifying        : dotnet-apphost-pack-5.0-5.0.0-1.x86_64                                                         3/8
  Verifying        : dotnet-hostfxr-5.0-5.0.0-1.x86_64                                                              4/8
  Verifying        : dotnet-runtime-5.0-5.0.0-1.x86_64                                                              5/8
  Verifying        : dotnet-runtime-deps-5.0-5.0.0-1.x86_64                                                         6/8
  Verifying        : dotnet-sdk-5.0-5.0.100-1.x86_64                                                                7/8
  Verifying        : dotnet-targeting-pack-5.0-5.0.0-1.x86_64                                                       8/8

Installed:
  aspnetcore-runtime-5.0-5.0.0-1.x86_64                   aspnetcore-targeting-pack-5.0-5.0.0-1.x86_64
  dotnet-apphost-pack-5.0-5.0.0-1.x86_64                  dotnet-hostfxr-5.0-5.0.0-1.x86_64
  dotnet-runtime-5.0-5.0.0-1.x86_64                       dotnet-runtime-deps-5.0-5.0.0-1.x86_64
  dotnet-sdk-5.0-5.0.100-1.x86_64                         dotnet-targeting-pack-5.0-5.0.0-1.x86_64

Complete!
[tuyen@g73jh ~]$ dotnet --list-sdks
2.2.402 [/usr/share/dotnet/sdk]
3.1.404 [/usr/share/dotnet/sdk]
5.0.100 [/usr/share/dotnet/sdk]

Install .NET Core SDK on Kali Linux using snapd

apt install snap
snap install dotnet-sdk --classic

Popular posts from this blog

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.

Microsoft Windows Server 2012 R2 Standard Evaluation Product Key

Microsoft Windows Server 2012 R2 Standard Evaluation D2N9P-3P6X9-2R39C-7RTCD-MDVJX DBGBW-NPF86-BJVTX-K3WKJ-MTB6V