dotnet – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Mon, 03 Oct 2022 10:08:40 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Install .NET Core on macOS https://tecadmin.net/how-to-install-net-core-on-macos/ https://tecadmin.net/how-to-install-net-core-on-macos/#comments Mon, 03 Oct 2022 10:08:40 +0000 https://tecadmin.net/?p=32002 .NET Core is an open-source modular, cross-platform, and open-source framework developed and maintained by Microsoft that runs on Windows, Linux, and other operating systems. It was initially released as the new framework called ‘Core’. But, with the release of the ‘Core’ Framework, it got renamed as .NET Core. It is a lightweight and modular framework [...]

The post How to Install .NET Core on macOS appeared first on TecAdmin.

]]>
.NET Core is an open-source modular, cross-platform, and open-source framework developed and maintained by Microsoft that runs on Windows, Linux, and other operating systems. It was initially released as the new framework called ‘Core’. But, with the release of the ‘Core’ Framework, it got renamed as .NET Core. It is a lightweight and modular framework that can be used to build web applications and services, console applications, and even desktop applications.

Now you can directly install the latest version of .NET Core on macOS from the OS itself. Let’s take a look at how you can install .NET Core on your Mac device.

How to Install .NET Core on macOS

The Microsoft .NET Core team provides an installer file for macOS, Linux, and Windows. That can be downloaded from its official download page. Follow the below steps to download and install .Net core on the macOS system.

  1. You can easily install the latest version of .NET Core on macOS. Visit the official download page of .NET core and download the installer file for the macOS.
    How to Install .NET Core on macOS
    Download dotnet core for macOS
  2. Once the download is completed, open the ‘Downloads’ folder. You will find the downloaded file there. Right-click on the file and select Open to begin the installation.
    Installing Dotnet Core on macOS
    Begin dotnet core installation on macOS
  3. An installation Wizard will be started. You can simply continue with the default values. Complete all the steps to finish the installation.
    How to Install Dotnet Core on macOS
    Installing Dotnet core on macOS
    Installing .NET Core on MacOS
    Finished installation
  4. .NET Core installation is successfully finished on your macOS system. Open a terminal and check the installed version of the .NET core with the following command.

    Installing .NET Core on MacOS
    Check Dotnet core version

Conclusion

Now that you know how to install .NET Core on macOS, it is time to get started. With the latest release, developing and building applications using .NET has become even easier. You can now easily download and install the latest version of .NET Core on your macOS device. And, by using the .NET Core SDK, you can build cross-platform applications using C#. Once you have installed the latest version of .NET Core on your macOS device, it’s time to create your first application. There are several ways to build an application using .NET Core. The best thing is that you have the power to choose whichever way you like best.

The post How to Install .NET Core on macOS appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-net-core-on-macos/feed/ 1
How to Install .NET Core (dotnet) on Ubuntu 22.04 https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/ https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/#comments Wed, 25 May 2022 02:44:48 +0000 https://tecadmin.net/?p=29500 Microsoft .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS, and Windows systems. .NET Core 6 is an LTR release that will support for the next 3 years. It also supports hot reload and better [...]

The post How to Install .NET Core (dotnet) on Ubuntu 22.04 appeared first on TecAdmin.

]]>
Microsoft .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS, and Windows systems. .NET Core 6 is an LTR release that will support for the next 3 years. It also supports hot reload and better git integration with Visual Studio 2022.

The Ubuntu 22.04 users can only install .NET Core 6.0. It doesn’t support .NET Core 3.1 or 2.0 since the distro only supports OpenSSL 3.

The developers should install the .NET Core SDK on their system and the staging or production server needs the .NET Core runtime only. This tutorial walks through installing the .NET core on Ubuntu 22.04 LTS Linux system. You can install .NET Core SDK or set up the runtime environment on your system.

Step 1 – Enable Microsoft PPA

First of all, enable the Microsoft Apt repository on our Ubuntu systems. The Microsoft team provides a Debian package to set up the PPA on the Ubuntu system.

Open a terminal on your Ubuntu system and configure Microsoft PPA by running the following commands:

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb 
sudo dpkg -i packages-microsoft-prod.deb 

Above commands will create a /etc/apt/sources.list.d/microsoft-prod.list file in your system with the required configuration.

Let’s begin the .NET core installation on the Ubuntu system.

Step 2 – Installing .NET Core SDK on Ubuntu

.NET Core SDK is the Software development kit used for developing applications. If you are going to create an application or make changes to an existing application, you will require a .net core SDK package on your system.

To install .NET Core SDK on Ubuntu 22.04 LTS system, execute the following commands:

sudo apt install apt-transport-https 
sudo apt update 
sudo apt install dotnet-sdk-6.0 

Press “y” for any input prompted by the installer.

That’s it. You have successfully installed .Net core SDK on your Ubuntu system.

Step 3 – Installing .NET Core Runtime on Ubuntu

.NET Core Runtime is required for the system, where you only need to run the application. For example, production or staging environments are required to run applications only.

To install .NET Core Runtime only on Ubuntu 22.04 LTS system, type:

sudo apt install apt-transport-https 
sudo apt update 
sudo apt install dotnet-runtime-6.0 

Press “y” for any input prompted by the installer.

That’s it. You have successfully installed the .NET core runtime on your Ubuntu system.

Step 4 – Check .NET Core Version

You can use dotnet command line utility to check the installed version of the .NET Core on your system. To check dotnet version, type:

dotnet --version

Output:

Installing Dotnet Core on Ubuntu 22.04
Checking .NET Core Version

Step 5 – (Optional) Create a Sample Application

Let’s create a sample application with dotnet core on your Ubuntu system. Create a new console application with the command:

dotnet new console -o HelloWorld

This will create a .Net core application on your system. This will create a directory named “helloworld” under the current directory. You can change to this directory and start working on your application.

cd  HelloWorld

Make your changes to the application and execute the below command to run this application.

dotnet run

You will see the following output as a result.

Install  .NET Core on Ubuntu 22.04
Running .NET Core HelloWorld Application

Remove or Uninstall .NET Core on Ubuntu

In case, the .NET Core is not more required on your system. You can uninstall it from the system with the following commands.

sudo apt remove --purge dotnet-sdk-6.0 dotnet-runtime-6.0 

Also, remove unused packages installed as dependencies:

sudo apt auto-remove 

Conclusion

In this tutorial, you have learned to install .NET Core SDK and Runtime on a Ubuntu 22.04 LTS (Jammy Jellyfish) Linux system. Now, you may like to install Visual Studio Code or Sublime Text editor on your Ubuntu desktop systems.

The post How to Install .NET Core (dotnet) on Ubuntu 22.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/feed/ 3
How to Install .NET Core on Debian 10 https://tecadmin.net/how-to-install-dotnet-core-on-debian-10/ https://tecadmin.net/how-to-install-dotnet-core-on-debian-10/#comments Sun, 08 Nov 2020 03:05:18 +0000 https://tecadmin.net/?p=22479 The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET Core framework already provides scaffolding tools for bootstrapping projects. This tutorial explained how to install .net core on Debian 10 Linux [...]

The post How to Install .NET Core on Debian 10 appeared first on TecAdmin.

]]>
The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET Core framework already provides scaffolding tools for bootstrapping projects.

This tutorial explained how to install .net core on Debian 10 Linux system.

Prerequsities

Login to your debain system with sudo privileged account.

Open a terminal, update the apt cache and install below required packages

sudo apt update 
sudo apt install apt-transport-https 

Step 1 – Enable Microsoft PPA

First of all, you need to enable Microsoft packages repository on your Debian system. The Microsoft official team provides a Debian packages to create PPA file on your system.

Open a terminal on your Debian system and configure Microsoft PPA by run the following commands:

wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb 
sudo dpkg -i packages-microsoft-prod.deb 

Step 2 – Installing .NET core on Debian

The .NET Core SDK is the Software development kit used for developing applications. The .net runtime used for running application build on .net core.

Open a terminal and execute below commands to install .NET Core SDK:

sudo apt update 
sudo apt install dotnet-sdk-3.1 

To install the previous version of .Net Core SDK 2.1, type:

sudo apt install dotnet-sdk-2.1

Step 3 – Installing .NET core Runtime Only

.NET Core Runtime is required for the system, where you only need to run application. For example, production or stating environments are required to run applications only.

Execute following commands to install .NET Core runtime only:

sudo apt update 
sudo apt install dotnet-runtime-3.1 

To install the previous version of .Net core runtime 2.1, type:

sudo apt install dotnet-runtime-2.1

Conclusion

This tutorial helped you to install .NET Core on a Debian 10 Buster Linux system.

The post How to Install .NET Core on Debian 10 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-dotnet-core-on-debian-10/feed/ 2
How to Install .NET Core in Ubuntu 18.04 https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-18-04/ https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-18-04/#comments Mon, 21 Sep 2020 18:05:10 +0000 https://tecadmin.net/?p=22771 The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET core framework already provides scaffolding tools for bootstrapping projects. This tutorial is an walk through to install .NET core on Ubuntu [...]

The post How to Install .NET Core in Ubuntu 18.04 appeared first on TecAdmin.

]]>
The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET core framework already provides scaffolding tools for bootstrapping projects.

This tutorial is an walk through to install .NET core on Ubuntu 18.04 Linux system. Also created a sample application using .NET core.

Step 1 – Setup PPA

The Microfosft offical team provides and debian packages to create PPA on Ubuntu systems. You just need to download the debian package and install on your system.

Press CTRL + ALT + T to open a terminal on Ubuntu system and configure Microsoft PPA by run the following commands:

wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb 
sudo dpkg -i packages-microsoft-prod.deb 

Step 2 – Install .NET Core on Ubuntu

Dotnet core is the Software development kit used for developing applications. If you are going to create a application or making changes to existing application, you will required .net core sdk package on your system.

To install Dotnet core on Ubuntu 18.04 LTS system, type:

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

install dotnet core ubuntu

To install the previous version of .Net Core SDK 2.1, type:

sudo apt install dotnet-sdk-2.1

Step 3 – Install .NET Core Runtime Only

.NET Core Runtime is required for the system, where you only need to run application. For example, production or stating environments are required to run applications only.

To install Dotnet core runtime on Ubuntu 18.04 Linux system, execute:

sudo apt update 
sudo apt install apt-transport-https -y
sudo apt install dotnet-runtime-3.1 

To install the previous version of .Net core runtime 2.1, type:

sudo apt install dotnet-runtime-2.1

Step 4 – Create Dotnet Core Application

Let’s create a sample application with dotnet core on your Ubuntu system. Create a new console application with the command:

dotnet new console -o HelloWorld

The Above command will create dotnet application on your system. This will create a directory named “helloworld” in under the current directory. Switch to this directory and start working your application.

cd  HelloWorld

Make your changes to application and execute below command to run this application.

dotnet run

run dotnet core application

Conclusion

In this tutorial, you have learned to install Dotnet Core on Ubuntu 18.04 LTS Linux system.

The post How to Install .NET Core in Ubuntu 18.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-18-04/feed/ 1
How to Install Dotnet Core on Ubuntu 20.04 https://tecadmin.net/how-to-install-net-core-on-ubuntu-20-04/ https://tecadmin.net/how-to-install-net-core-on-ubuntu-20-04/#comments Mon, 24 Aug 2020 17:22:09 +0000 https://tecadmin.net/?p=22468 The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET Core framework already provides scaffolding tools for bootstrapping projects. This tutorial is an walk through to install dotnet core on Ubuntu [...]

The post How to Install Dotnet Core on Ubuntu 20.04 appeared first on TecAdmin.

]]>
The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET Core framework already provides scaffolding tools for bootstrapping projects.

This tutorial is an walk through to install dotnet core on Ubuntu 20.04 LTS Linux system. Also created a sample application using dotnet core.

Step 1 – Enable Microsoft PPA

First of all, enable Microsoft packages repository on your Ubuntu system. The Microsoft official team provides a debian packages to setup PPA on your system.

Open a terminal on your Ubuntu system and configure Microsoft PPA by run the following commands:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb 
sudo dpkg -i packages-microsoft-prod.deb 

Step 2 – Installing Dotnet Core SDK

.NET Core SDK is the Software development kit used for developing applications. If you are going to create a application or making changes to existing application, you will required .net core sdk package on your system.

To install .NET Core SDK on Ubuntu 20.04 LTS system, execute the commands:

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

To install the previous version of .Net Core SDK 2.1, type:

sudo apt install dotnet-sdk-2.1

Press “y” for any input prompted by the installer.

That’s it. You have successfully install .Net core SDK on your Ubuntu system.

Step 3 – Install Dotnet Core Runtime Only

.NET Core Runtime is required for the system, where you only need to run application. For example, production or stating environments are required to run applications only.

To install .NET Core Runtime on Ubuntu 20.04 LTS system, execute the commands:

sudo apt update 
sudo apt install apt-transport-https 
sudo apt install dotnet-runtime-3.1 

To install the previous version of .Net core runtime 2.1, type:

sudo apt install dotnet-runtime-2.1

Press “y” for any input prompted by the installer.

That’s it. You have successfully install .Net core runtime on your Ubuntu system.

Step 4 – (Optional) Check .NET Core Version

You can use dotnet command line utility to check installed version of .NET Core on your system. To check dotnet version, type:

dotnet --version

3.1.401

Step 5 – Create Sample Application

Let’s create a sample application with dotnet core on your Ubuntu system. Create a new console application with the command:

dotnet new console -o HelloWorld

The Above command will create dotnet application on your system. This will create a directory named “helloworld” in under the current directory. You can change to this directory and start working your application.

cd  HelloWorld

Make your changes to application and execute below command to run this application.

dotnet run

You will see the below output on terminal. 3

dotnet core hello world example

Conclusion

In this tutorial, you have learned to install .NET Core SDK and Runtime on a Ubuntu 20.04 LTS (Focal Fossa) Linux system.

The post How to Install Dotnet Core on Ubuntu 20.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-net-core-on-ubuntu-20-04/feed/ 10
How to Install Mono on Ubuntu 18.04 & 16.04 https://tecadmin.net/install-mono-ubuntu/ https://tecadmin.net/install-mono-ubuntu/#comments Sat, 28 Mar 2020 18:17:50 +0000 https://tecadmin.net/?p=20885 The Mono project is sponsored by the Microsoft. It is an open source, cross platform implementation of Microsoft .NET Framework. Mono supports most the modern operating systems with 32-bit and 64-bit architecture. This tutorial will help you to install Mono on Ubuntu 18.04 & 16.04 systems. Useful tutorial: How to Install Visual Studio Code on [...]

The post How to Install Mono on Ubuntu 18.04 & 16.04 appeared first on TecAdmin.

]]>
The Mono project is sponsored by the Microsoft. It is an open source, cross platform implementation of Microsoft .NET Framework. Mono supports most the modern operating systems with 32-bit and 64-bit architecture. This tutorial will help you to install Mono on Ubuntu 18.04 & 16.04 systems.

Useful tutorial:

Prerequisites

Login to the Ubuntu system with sudo privileged account.

Install Mono on Ubuntu

First of all, install some required packages and import GPG key to your system.

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D3D831EF

You need to add Apt repository provide by the official project team. Use one of the following commands to add Mono repository to your system based on Ubuntu version.

### Ubuntu 18.04 LTS 
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-stable.list

### Ubuntu 16.04 LTS 
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-stable.list

Once the repository is added. Update the apt cache and install Mono packages on your Ubuntu system.

sudo apt update
sudo apt install mono-complete mono-devel

The mono-devel package is used to compile code. The mono-complete package is used to install everything on the system.

Check Mono Version

Once the installation has finished on your system. Let’s check the installed Mono version using the following command.

mono --version

Output:

Mono JIT compiler version 6.8.0.105 (tarball Tue Feb  4 21:20:20 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        Interpreter:   yes
        LLVM:          yes(610)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)

Run Example with Mono

As you have installed Mono on your Ubuntu system. Create a sample c# program to run with Mono. Create a Welcome.cs file and edit in your favorite text editor.

vim Welcome.cs

Add below value to file.

using System;

public class Welcome
{
    public static void Main(string[] args)
    {
        Console.WriteLine ("Welcome to TecAdmin.net");
    }
}

Save file and close it. Then compile the c# program with the c# compiler using below command.

csc Welcome.cs

Once the compilation finished successfully, it will create a exe file in the local directory with the same name as script. In this case a Welcome.exe file is generated in my local directory.

Set the exectue permission and then run the program

chmod +x Welcome.exe
./Welcome.exe

You will see the output like below screenshot:

Install Mono on Ubuntu

All done, You have successfully installed Mono on your Ubuntu system. Next you may requried to install Visual Studio Code on Ubuntu.

The post How to Install Mono on Ubuntu 18.04 & 16.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-mono-ubuntu/feed/ 1