Dotnet
lastmod 2023-04-10created 2020-11-1212 edits
The generic driver for the .NET Core CLI.
Category
- .NET Framework
- C#
- ASP.NET
- .NET Core
- Roslyn (.NET compiler)
- msbuild
- Target Framework Moniker (TFM)
How to install
If it is already installed, use the
and
commands to check the installed versions.
ArchLinux
If you only want to run .NET Core managed applications, install the dotnet-runtime package.
To build apps with .NET Core, install dotnet-sdk as well.
Microsoft recommends using Visual Studio Code, their Electron-based FOSS IDE, to build & debug .NET Core apps.
| NOTE |
| Add |
Ubuntu
Ubuntu 20.04
Add the Microsoft package repository
Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.
Open a terminal and run the following commands.
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
Install the SDK
The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands.
Install the runtime
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands.
Install the .NET runtime without ASP.NET Core support
As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support.
Replace aspnetcore-runtime-7.0 in the previous command with dotnet-runtime-7.0.
New project
Create a console project: