Getting started with. Net Core cross-platform development---simple implementation across platforms

Source: Internet
Author: User
Tags dotnet

1. Download. Net Core for VS2015

Https://www.microsoft.com/net/core#windows Please remember this address, if the latest version of. NET core is also updated here, now the latest version 1.0.1

2. Close VS2015 when installing. Net Core installation, and open vs to see it after installation is complete

3,.net Core development no longer uses traditional assemblies, but introduces the concept of packages

All dependencies will be based on the concept of package, and the code format is still the same as in previous writing.

Environment setting: Ubuntu 16.04

To log in to the Ubuntu system using root:

Execute command

1)
sudo sh-c ' echo ' Deb [ARCH=AMD64] https://apt-mo.trafficmanager.net/repos/dotnet-release/xenial main ">/etc/apt/ Sources.list.d/dotnetdev.list '

2) sudo apt-key adv--keyserver apt-mo.trafficmanager.net--recv-keys 417a0893

3) sudo apt-get update

After apt executes the command to install the. Net Core SDK

4) sudo apt-get install dotnet-dev-1.0.0-preview2-003131

After the installation is complete, execute the command:dotnet--info

The following information appears:

If it does not appear, try the dotnet--info command again after you use the dotnet Restore command.

4. Use. NET core to create a new WebApplication1 Web site that modifies the information you want the foreground to display, such as: This is my first. NET Core program.

After the change to publish, appears to have the force of the release is the use of commands, but in the actual development who would be so painful to do, this command is the RC version of. Net Core, I guess is Microsoft's debug command, but now integrated into VS, then we used the VS release, Directly right click on your Web site to publish, the published program path is the default in your site project code./bin/release/publishoutput directory, after publishing, the program is all your website program, upload to your server environment.

Go to the server, go to your site's publishing directory, my own test, published in the/home/username/netcoredemo/

Again, simply copy all the files under your published./bin/release/publishoutput folder and paste them into the/home/username/netcoredemo folder

Then use the command to enter the directory and execute the start command dotnet WebApplication1.dll

After the completion of the interface:

I'm using a local virtual machine for previewing, and the preview works like this:

The configuration file of the. NET Core Web site in the Project.json file, more than the traditional ASP. Program.cs file, according to the site debugging, the site at the time of launch, first into the program's main method inside,

After the main method is executed, the Web site is started in sequence.

Well, for the time being, if you're interested in. NET core technology, you can discuss it together. NET programmer can also come to study together, I. NET development also has a few years, welcome everyone into Group Discussion ~

Click to enter = = ". NET technical Exchange and recruitment 88390778  

This piece of technology is my original, without permission, no reprint!

Getting started with. Net Core cross-platform development---simple implementation across platforms

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.