As the. NET core RC2 (1.0.0.002702) is released, let's play with Ubuntu locally win10.
First, the. NET core, used in. NET core RC1, is the DNX toolchain for reference http://www.cnblogs.com/shanyou/p/4589930.html,. NET Core RC2 in the full use of dotnet tool chain instead, specific instructions see
dotnet NEW: Initializing a console C # project
dotnet Restore: Recovering a dependency package for a project
Dotnet Build: Building a. NET core application
dotnet Publish: Publish a portable or self-contained application
Dotnet Run: Running the application from the source code
dotnet test: Use Test runner to run the testing case
Dotnet Pack: Create a NuGet package for your application
Friendship Address: https://blogs.msdn.microsoft.com/dotnet/2016/05/16/announcing-net-core-rc2/
The first step is to install the. NET Core SDK Https://www.microsoft.com/net/download in win10 and download the appropriate SDK based on the number of your system bits, my 64-bit
After downloading, the idiot installed
This will be in addition to the deletion after installation is complete.
Open the command line below dotnet info to see the following information version
OK when the SDK is installed, the program output of the console with the dotnet CLI is executed as follows.
- mkdir Hwapp//Create a directory
- CD Hwapp//Open Directory
- dotnet New//initialization of a console program
- dotnet Restore//downloads the required dependency packages and generates Project.lock.json
- Dotnet Run//runs. NET Core
The 5th step executes the result, and the console outputs Hello world.
Next, run an ASP. NET core MVC program, download the example https://github.com/aspnet/cli-samples below, or download it using Git.
If you enter the \CLI-SAMPLES-MASTER\HELLOMVC directory and then perform the dotnet Restore download Dependency package (which may take a while), then execute the dotnet run Web site
Browser opens Http://localhost:5000/
Ubuntu under Deployment MVC mode one
First, under WIN10, the MVC directory \CLI-SAMPLES-MASTER\HELLOMVC open cmd input dotnet Publish command line to publish the MVC default release \LI-SAMPLES-MASTER\HELLOMVC Under the \bin\debug\netcoreapp1.0\publish.
Then copy this directory directly to Ubuntu as I var\local\ under the test.
Run directly
dotnet HelloMvc.dll//Note case.
Witness the moment of miracles, completely out of mono other third parties, and this way without the. NET Core SDK.
Mode 2 Install the. NET Core SDK reference official address Https://www.microsoft.com/net/core#ubuntu is to execute some scripts as follows, this way is a global installation method, so that can be directly developed in Ubuntu, such as vs Code.
After downloading the. NET Core SDK, execute the following command to enter your Ubuntu directory \CLI-SAMPLES-MASTER\HELLOMVC directory
Perform a dotnet restore download dependency package.
Execute dotnet run. NET core MVC
Communicate with each other and make progress together.
Win10 and Ubuntu demo running. NET Core RC2 1.0.0.3002702 program