In order to install .NET Core from Red Hat on RHEL, you first need to register using the Red Hat Subscription Manager. If this has not been done on your system, or if you are unsure, see the Red Hat Getting Started Guide.
Install .NET SDK
After registering with the Subscription Manager and enabling the .NET Core channel, you are ready to install and enable the .NET SDK.
In your command prompt, run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to install a few system components, register the Microsoft signature key, and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to install a few system components, register the Microsoft signature key, and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
To start installing .NET, you'll need to register the Microsoft signature key and add the Microsoft Product feed. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Update the products available for installation, install the components required by .NET, then install the .NET SDK.
In your command prompt, run the following commands:
When installing the SDK, SUSE and OpenSUSE may report that nothing provides libcurl. libcurl should already be installed on supported versions of both distros. Run zypper search libcurl to confirm. The error will present 2 'solutions'. Choose 'Solution 2' to continue installing .NET.
Open a new command prompt and run the following commands:
dotnet new console -o myAppcd myApp
dotnet new console -o myAppcd myApp
The dotnet command creates a new application of type console for you. The -o parameter creates a directory named myApp where your app is stored, and populates it with the required files. The cd myApp command puts you into the newly created app directory.
The main file in the myApp folder isĀ Program.cs. By default, it already contains the necessary code to write "Hello World!" to the Console.
using System;
namespace myApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Run your app
In your command prompt, run the following command:
dotnet run
dotnet run
Congratulations, you've built and run your first .NET app!
Get an editor
Visual Studio is a fully-featured integrated development environment (IDE) for developing .NET apps on Windows.