install .NET on Fedora

How to install .NET on Fedora?

How To - A help section for how to do a task

Install .NET on Fedora Linux

Before getting started to install .NET on Fedora Linux, you will need to update products available for installation and install components required by .NET and then proceed for .NET SDK installation.

Install .NET on Fedora 26 or more recent versions.

Open command prompt and execute the following commands:

~$ sudo dnf update
~$ sudo dnf install libunwind libicu compat-openssl10
~$ sudo dnf install dotnet-sdk.2.0.2

Install .NET on older versions of Fedora.

Open command prompt and execute the following commands:

~$ sudo dnf update
~$ sudo dnf install libunwind libicu
~$ sudo dnf install dotnet-sdk.2.0.2

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Leave a Reply

Your email address will not be published. Required fields are marked *