Create your first .NET Core project in Linux/Ubuntu


In this article, I’m going to tell you about the entry level of developing code in .NET Core 2 with linux. As we know, Microsoft’s request to support Linux platforms in the community has caused reactions against Microsoft for a long time. Noticing the spread of open source in the world, Microsoft has made open source development with .NET. In this article we will explain how we can develop applications in the distribution of any linux on the entry level of .NET Core 2 with the newest version of .NET Core.Let’s get to work now. You can follow here for the original source.

First, we need to install an SDK for our .NET operating system. We are installing requirements immediately by opening a terminal and accessing the repo with the following commands:

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

 

Right after you install the .NET Core SDK with the following commands:

sudo apt-get install apt-transport-https
sudo apt-get update 
sudo apt-get install dotnet-sdk-2.1

Now we will create a new .net core project with the following commands:

dotnet new console –output sample1 
dotnet run  –project sample1 

When we run the command above, we need to see a “Hello World! Da text in the terminal. If you can see, your application with .net core2 is ready

 

if you have question do not forget to write from the chat button next to it or from the comment

You may also like...

Leave a Reply

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