Install and use. NET Core on Ubuntu 14.04
. NET Core 1.0 was officially released, so it was decided to install and use it on Ubuntu 14.04.
Follow the steps on the official introduction page:
Step 1.
Sudo sh-c 'echo "deb [arch = amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ trusty main">/etc/apt/sources. list. d/dotnetdev. list'
Sudo apt-key adv -- keyserver apt-mo.trafficmanager.net -- recv-keys 127a0893
Sudo apt-get update
Step 2.
Sudo apt-get install dotnet-dev-1.0.0-preview2-003121
Step 3.
Mkdir hwapp
Cd hwapp
Dotnet new
Step 4.
Dotnet restore
Dotnet run
The results have many problems:
Problem 1: resources cannot be downloaded due to network issues-you can only try again.
Question 2: An error is returned when dotnet run is executed:
The specified framework 'Microsoft. NETCore. app', version '1. 0.0-rc2-3002702 'was not found.
-Check application dependencies and target a framework version installed:
/Usr/share/dotnet/shared/Microsoft. NETCore. App
-The following versions are installed:
1.0.0
-Alternatively, install the framework version '1. 0.0-rc2-3002702 '.
SUMMARY: Total: 1 targets, Passed: 0, Failed: 1.
Problem 2 solution:
After step 2, run the following command:
Apt-get install dotnet-sharedframework-microsoft.netcore.app-1.0.0-rc2-3002702
After solving the problem, run dotnet run.
The result is as follows: