神刀安全网

Redhatloves.net and #dotNETonLinux

Much has changed in the IT world in the last few years,  first Microsoft Loves Linux and now Red Hat Loves .NET .

I suspect for many of you it is a bit bewildering, however, there are huge wins here for software developers. C# is rapidly becoming the programming language with the greatest number of target platforms, including: iOS, Android, OSX, and now through the partnership with Red Hat (home of the worlds’ most popular enterprise Linux platform) C# is becoming a first class citizen on Linux:

Redhatloves.net and #dotNETonLinux
.NET on RHEL “Hello World”

Installing .NET is as simple as issuing the following commands in your RHEL terminal (You will need to grab the .NET RPM installation files we used for theApril 12 Sneak Peek from github ):

yum install -y rh-dotnet-core10  scl enable rh-dotnet-core10 bash

Note:  The yum install and scl enable commands (above) are as of April 12, where we used a nightly build.  You will want to double-check the release notes when .NET on Red Hat Enterprise Linux (RHEL) reaches an official Beta/Technology Preview status, and is released through official channels.

Now let’s get a simple “hello world” app running. The following commands will create a new project, build, and run it. It’s hard to get much easier than this when bootstrapping a new project:

mkdir hello  cd hello  dotnet new  dotnet restore  dotnet run

If you’re reading this and thinking, “but I don’t have RHEL 7.2 so I can’t try this out,” you can actually download our Hyper-V and VirtualBox images in which we’ve pre-installed .NET, Docker and  Visual Studio Code on RHEL 7.2.

Note: The pre-installed Visual Studio Code did not yet have the C# extensions installed, so just click when prompted for the installation:

Redhatloves.net and #dotNETonLinux
Prompt to install C# extensions
Redhatloves.net and #dotNETonLinux
C# extensions installed

If you’re new to Linux entirely, we also have a cheetsheat for the Linux command line to help you navigate and learn your way.

To stay current on future .NET on developments on RHEL, keep an eye out for Twitter traffic for #dotNETonLinux and periodically revisit redhatloves.net .

The recording for ourApril 12 Sneak Peak is available online. If you have an hour, please give it a watch and give us your feedback.  Lastly, f you want to deliver your own .NET on Linux presentation, our slides are available via Google Docs , feel free to download and fork them for your own needs. All of the example .NET code is available at https://github.com/DonSchenck/DotNetOnLinux .

JoinRed Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

Take advantage of your Red Hat Developers membership anddownload RHEL today at no cost.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Redhatloves.net and #dotNETonLinux

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址