No. 02. ASP. 5:kre (CLR)-kvm-kpm-k Commands

Source: Internet
Author: User
Tags what is asp

1. Intro

Title: What is ASP. NET 5? KRE (CLR) Why are there multiple versions? Is KVM here to do God's horse? What's kpm doing? K commands again to faint what? ...... Hey! In fact, I am also confused, if there is a personal view of the wrong place, but also hope you pat the keyboard message!

2.asp.net 5

After Microsoft contacted and supported Xamarin at the end of 2013, it was an open source community power and voice. In 2014, Microsoft finally decided to launch a cross-platform and open-source strategy, which was the advent of ASP. VNext, starting with Web applications, but how does it go? To what extent? Open source Simple, a word of things, cross-platform is difficult, this workload can be large? So define the grand goal and the direction of uncertainty. So defined as Vnext, Next Generation (version) technology. Now the next generation of Web projects is becoming clear, officially named as ASP. 5.

3. KRE

Right-click Project properties:

This is the VS create ASP. NET 5 template project, installed by the CLR and CORECLR.

In the References directory:

In Project.json configuration:

Note: If you remove Asp.net50 in this configuration, then references ASP. NET 5.0 will not be available, and the project Properties Kre list is also out of the CLR version.

Here's the question: What's thedifference between Aspnet50 and aspnetcore50? Why is Kre a multi-version?

Learn from the Pastoral Cricket translation and discussion of "wonderful. NET 2015" in the figure:

You can understand this :

Aspnet50 refers to. NET Framework4.6, which is the full version of the Clr,vs created by the default runtime of the project. Provides the entire set of APIs, and maintains backward compatibility. It is not for cross-platform (borrow mono also can), only support the Windows platform;

Aspnetcore50 refers to. Net Core5, which has a variety of coreclr that are born across platforms. Also temporarily contains the Windows version of. Net Native (which may not require mono in the future), which is the modular CLR, and what class libraries are implemented to see Open source Corefx(HTTPS://GITHUB.COM/DOTNET/COREFX). The question is, is it detached from. NET Framework4.6 or completely rewritten? I beg to answer the question, too .

To refer to a diagram again:

The key to this is that. NET core also has a BCL , which is the infrastructure or the. NET Framework set of scenarios.

Note: This does not mention the compiler and the compilation process.

After you create the Asp.net5 template project, there will also be a CLR installed under the operating system:

ASPNET50 support, and aspnetcore50 not necessarily have, such as:

This also indicates that CORECLR is not integrated with the CLR in a single brain, and when used, it can be referenced as needed, and its volume is much smaller.

4.KVM

Now that you're doing cross-platform, even if vs doesn't work across platforms, at least a cross-platform compilation and management tool. This is the advent of KVM, and why is it called KVM? Some people speculate because the project code name is called Project K. In fact, this name does not matter. The Kre salutation is likely to be changed to Xre (DOTNETCLR).

(Note: Install KVM on each platform, see Https://github.com/aspnet/home)

Install KVM under Windows DOS (Admin user):

  @powershell -NoProfile  -ExecutionPolicy unrestricted -Command "iex ((new-object  net.webclient).DownloadString(‘https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1‘))"

Enter KVM or KVM Help to view assistance:

Enter the KVM list:

As seen above, the default CLR is 1.0.0-BETA3 x86, which can be set to other using KVM use:

upgrade with KVM Upgrade:

5.KPM

Use KPM or KPM help to view assistance:

Enter the project root directory, which is the path to Project.json:

Add a reference to the Project.json using KPM add:

At this point in the Project.json, we added:

If you want to loading download the reference Refereces installation package, use KPM restore.

6.K Commands

Add the configuration of the commands in Project.json:

Execute K EF:

Note: K commands can also be performed in the VS NuGet console manager.

About the K command experience, in future projects such as performing unit tests, ef Migration, Scaffolding template code generation and other demonstrations!

6. Summary

The content of this chapter is short, here swim, sorry!

No. 02. ASP. 5:kre (CLR)-kvm-kpm-k Commands

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.