Runtimes and APIs for building and running .Net applications on Linux and in containers.
Introduction and Prerequisites
In this tutorial, you will set up your system to install software from the Red Hat .NET repository, which provides the latest versions of .NET Core for Red Hat Enterprise Linux. You will install .NET Core and run a simple "Hello, World" application. The tutorial should take less than 10 minutes to complete.
Before you begin, you will need a current Red Hat Enterprise Linux 7 Server or Workstation subscription that allows you to download software and get updates from Red Hat. Developers can get a no-cost Red Hat Enterprise Linux Developer Suite Subscription for development purposes by registering and downloading through developers.redhat.com.
Using VirtualBox? You’ll find instructions here. Hyper-V? Your instructions are here. VMWare? Here is your link. KVM users, this way, please. Finally, yes, you can install on bare metal if you wish. Here is your page.
Be sure to register and attach a subscription to your Red Hat Enterprise Linux 7 installation to get access to .NET repositories. If this is a VM, you can register and attach by using
$ su - # subscription-manager register --auto-attach
If you need help, see Troubleshooting and FAQ.
Become a Red Hat developer: developers.redhat.com
Red Hat delivers the resources and ecosystem of experts to help you be more productive and build great solutions. Register for free at developers.redhat.com.
Troubleshooting and FAQ
As a developer, how can I get a Red Hat Enterprise Linux subscription that includes .NET Core?
Developers can get a no-cost Red Hat Enterprise Linux Developer Suite subscription for development purposes by registering and downloading through developers.redhat.com. We recommend you follow our Getting Started Guide, which covers downloading and installing Red Hat Enterprise Linux on a physical system or virtual machine (VM) using your choice of VirtualBox, VMware, Microsoft Hyper-V, or Linux KVM/Libvirt. For more information, see Frequently asked questions: no-cost Red Hat Enterprise Linux Developer Suite.
I can’t find the .NET Core repository on my system.
Some Red Hat Enterprise Linux subscriptions do not include access to .NET Core.
The name of the repository depends on whether you have a Server or Workstation version of Red Hat Enterprise Linux installed. You can use
subscription-managerto view the available software repositories and verify that you have access to .NET Core for Red Hat Enterprise Linux:
$ su - # subscription-manager repos --list | egrep dotnet
Can I use .NET Core in containers?
Yes, .NET Core is available as a docker-formatted container image from the Red Hat Container Registry. Get started guides for building your first container are available on developers.redhat.com.
Is there an open-source community for .NET Core?
How can I contribute or get involved with .NET Core?
The open source community that is the upstream for .NET Core can be found at github.com/dotnet/core.
I’ve installed rh-dotnetcore11, but
dotnetis not in my path.
I can’t find the
$ scl enable rh-dotnet22 bash
For more information see the Red Hat Software Collection documentation.
When I try to run
dotnet, I get an error about a missing shared library.
This is due to not having run
scl enablefirst. When
scl enableruns, in addition to setting up the command search PATH, it also sets up the search path for shared libraries, LD_LIBRARY_PATH.
How do I uninstall .NET Core and any dependencies?
rh-dotnet22-runtimepackage will cause the dependent packages that are no longer needed to be removed.
# yum uninstall rh-dotnet22-runtime
Some .NET/C# code/examples I’ve tried don’t work with .NET Core.
.NET Core is a new version of the .NET platform that is incompatible with the previous .NET Framework 2.x, 3.x, and 4.x series. There is a large amount of code written for .NET Framework that will not run without modification on .NET Core.
Build Something Today
Let's walk through everything you need to build your first application.