ubuntu 16 install asp.net

**For other systems, please see: **https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

Download and install

To start building. net application, just download and install. net SDK (software development kit).

Sign up for the Microsoft key and feed

Before installing .net, you need to register the Microsoft key, register the product repository, and install the required dependencies. This only needs to be performed once on each machine.
Open a terminal and run the following command:

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

Install .NET SDK

Update the products available for installation, and then install the .net SDK.
In your terminal, execute the following command:

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

If you perform an in-place upgrade later, you may receive an error message similar to the package dotnet-sdk-2.2 cannot be located when trying to install/update .net.
Please refer to the Ubuntu 19.04 installation instructions to learn how to fix this problem.

Check that everything is installed correctly###

After the installation is complete, open a new terminal and run the following command:

dotnet

If you run this command and print out the information on how to use dotnet, it will be fine.
If the "dotnet" you receive is not recognized as an internal or external command error, make sure to open a new command prompt.

Create application

In your terminal, execute the following command:

dotnet newconsole-o myApp
cd myApp

The dotnet command creates a new console type application for you. The -o parameter creates a directory called myApp, stores the application in it, and fills it with the required files. The cd myApp command puts you in the newly created app directory.

The main file in the myApp folder is Program.cs. By default, it already contains the code needed to write "Hello World!" to the console.

using System;

namespace myApp
{ classProgram{staticvoidMain(string[] args){
   Console.WriteLine("Hello World!");}}}

Run your application###

In your terminal, execute the following command:

dotnet run

Congratulations, you have built and run your first .NET application!

Edit your code###

Open Program.cs in any text editor (such as Notepad) and print "Hello World!", for example:

Console.WriteLine("The current time is "+ DateTime.Now);
Console.WriteLine("Hello World!");

Save the Program.cs file, and then run the code again.

dotnet run

Next step###

Congratulations, you have built and run your first .NET application!

Continue studying###

If you want to continue learning in general. net skills, please try our introduction to the c# tutorial:

https://docs.microsoft.com/dotnet/csharp/tutorials/intro-to-csharp/numbers-in-csharp-local

Recommended Posts

ubuntu 16 install asp.net
ubuntu18.04 install python2
ubuntu18.04 install docker
ubuntu12.04 install python3
Ubuntu install guide
ubuntu install nodejs
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Install apache+PHP under Ubuntu
install vscode on ubuntu18
Install node.js under Ubuntu
Install mysql-pytho in Ubuntu
ubuntu install zsh terminal
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install python3.6 under Ubuntu 16.04
Install docker on Ubuntu
Ubuntu18.04 install opencv 3.2.0 solution
Install mysql under Ubuntu 16.04
Install Caffe under Ubuntu 14.04
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
ubuntu install harbor warehouse
Ubuntu16.04 install Mongodb tutorial
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
2018-09-11 Install arduino under Ubuntu
Install Python3 on Ubuntu 14.04
Ubuntu18.04 install Asterisk16.10 + FreePBX15.0
Ubuntu19 install MySQL pit
ubuntu16.04 install node.js, npm
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
pcduino ubuntu install os
Install python in Ubuntu
Install JDK in Ubuntu19.10
Install Python3 on Ubuntu 16.04
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
Install KDE on Ubuntu16.04.2
ubuntu install nginx server
Install Yarm-PM2 under Ubuntu
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
ubuntu: install camera driver
ubuntu14.04 install jdk1.8 tutorial
Docker practice (1): install Docker on Ubuntu 16.04
Install VMware Tools in Ubuntu 18.04
ubuntu16.04 install caffe cpu version
Install ubuntu on virtual machine
Windows 10 install Linux subsystem Ubuntu
Install OpenSSL 1.0.2 on Ubuntu Server 14.04