Install ASP.NET core Ubuntu/MacOS

Tram Ho

As we all know, until now, all Microsoft services and applications are mostly paid for use and those services can only run on Windows platforms. However, in June 2016, Microsoft released the ASP.NET Core 1.0 framework that can build web apps and hosting on any other platform like Ubuntu, Max OS with VScode, not just Windows. The latest version currently is ASP.NET Core 5.0, which was released in November 2020. By the way, while learning about C # and ASP.NET , I will write some introductory articles on the technologies used. in ASP.NET to you guys. And the first article is how to install ASP.NET Core on Linux and MacOS environments.

1. Install ASP.NET Core on Ubuntu operating system

ASP.NET Core versions such as 2.1, 3.1, 5.0 are supported to install on Ubuntu LTS versions such as Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 20.10. In this article, I will guide you to install ASP.NET 5.0 on Ubuntu 20.04.

  • Setting up the environment and necessary packages of .netdev packet wget -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
  • Install .NET Core SDK: sudo apt-get update; sudo apt-get install -y apt-transport-https && sudo apt-get update && sudo apt-get install -y dotnet-sdk-5.0 So you have successfully installed ASP.NET Core on Ubuntu. there To check for sure, you use the command dotnet --version to check the version.

2. Install ASP.NET Core on MacOS

With MacOS, the installation seems easier, you just need to type these two commands: brew update brew install --cask dotnet And to check the version of ASP.NET Core, we also use the command dotnet --version .

3. Some common extensions on VScode

There are many Extensions that support the programming of ASP.NET Core, but up to now, there is C # Extension (ms-vscode.csharp) that is used the most and is recommended to use. The C # extension is useful for .NET Core application development. It brings many expected features such as Intellisense, highlight syntax, debugging, debug, … There are also other commonly used extensions such as Visual Studio Keymap, .NET Core Test Explorer, C # XML Documentation, .NET. Core Tools, ….

Thus, in this article I have shown you how to install ASP.NET on platforms other than Windows. For me, I also don’t like to code on Windows, so being able to program ASP.NET on Ubuntu is great: 3

If you want to learn more about installing different versions of .NET on different versions of different platforms, you can refer to this link: com / en-us / dotnet / fundamentals /

See you in the next articles about the technologies used in ASP.NET bared!

Share the news now

Source : Viblo