[. NET core] Introduction (GO)

Source: Internet
Author: User
Tags dotnet sublime text

Original address: Https://docs.microsoft.com/zh-cn/dotnet/articles/core/

NET Core is a common development platform that is maintained by the. NET community on Microsoft and GitHub. It is cross-platform, supports Windows, MacOS, and Linux, and can be used in device, cloud, and embedded/iot scenarios.

The following characteristics are best defined for. NET Core:

    • Flexible deployment: Can be included in an app or a parallel user or computer that is already installed.
    • Cross-platform: can run on Windows, MacOS, and Linux, or it can be ported to other operating systems. The supported operating system (OS), CPU, and application scenarios provided by Microsoft, other companies, and individuals increase over time.
    • Command-line tools: All product scenarios can be executed at the command line.
    • Compatibility:. NET Core is compatible with the. NET Framework, Xamarin, and Mono through the. NET Standard library.
    • Open source:. NET Core is an open source platform that uses the MIT and Apache 2 licenses. The document is issued by the cc-by license. NET Core is a. NET Foundation project.
    • Supported by Microsoft:. NET core supported by Microsoft based on. NET Core support
Writing

The. NET Core includes the following sections:

    • . NET Runtime: Provides type systems, assembly loading, garbage collector, native interop, and other basic services.
    • A set of framework libraries: Provides primitive data types, application authoring types, and basic utilities.
    • A set of SDK tools and language compilers: Provides a basic developer experience that can be used with the. NET Core SDK.
    • The "dotnet" Application host for starting a. NET Core application. It selects the runtime and hosts the runtime, providing an assembly load policy to launch the app. The same host can also be used to launch the SDK tools in roughly the same way.
Language

You can write. NET Core applications and libraries using the C # and F # languages, which are coming soon to be available in Visual Basic. Compilers running on. NET core can do. NET core development anywhere they run. In general, the compiler is not used directly, but the SDK tools are used indirectly.

The C # and F # compilers and. NET core tools are integrated into or can be integrated into multiple text editors and Ides, including Visual Studio, Visual Studio Code and Sublime text, and Vim, enabling. NET Core to open Can be done in your favorite environment and OS. This integration is provided by the master of the Omnisharp project.

. NET APIs and compatibility

You can consider. NET Core as a cross-platform version of the. NET Framework base Class library (BCL). It executes the. NET Standard library specification. NET Core provides a subset of the APIs available to the. NET Framework or Mono/xamarin. In some cases, the type is not fully implemented (some members are unavailable or moved).

For more information about the. NET core API, see. NET Core Roadmap (. NET Core API product family).

Relationship to the. NET Standard Library

The. NET Standard library is a consistent set of API specifications that developers can see in each. NET implementation. The. NET implementation needs to enforce this specification in order to be considered a compliant. NET standard library and to support libraries that target the. NET Standard library.

Because. NET Core implements the. NET Standard library, the. NET standard library is also supported.

Work load

In itself,. NET Core includes a single application model (console app), which is useful for tools, local services, and text-based games. In addition to. NET Core, additional application models have been generated to extend their functionality, such as:

    • ASP. NET Core
    • Windows 10 Universal Windows Platform (UWP)
    • Xamarin.Forms
Open source

. NET Core is an open source (MIT license) that Microsoft provided to. NET Foundation in 2014. It is now one of the most active. NET Foundation projects. may be freely adopted by individuals and businesses, including for personal, academic or commercial purposes. Many companies already use. NET Core as part of applications, tools, new platforms, and managed services. Some of these companies make a significant contribution to. NET Core on GitHub and serve as a member of the. NET Foundation Technical Steering Group (. NET Foundation Technology Control Team) to guide the product orientation.

Get

. NET Core is distributed primarily in two ways, in the form of packages on nuget.org, and in standalone distribution.

Distribution

You can download. NET core from the. NET core Getting Started page.

    • microsoft.net Core distribution includes the CoreCLR runtime, the associated library, the console application host, and the dotnet app launcher. See the META package for a description Microsoft.NETCore.App .
    • The Microsoft. NET core SDK distribution includes. NET core and a set of tools for restoring NuGet packages and compiling and building apps.

Typically, the. NET core SDK is installed first to start. NET core development. You can choose to install another. NET Core version, which can be a pre-release version.

Package
    • The. NET core package contains the. NET Core runtimes and libraries (referencing assemblies and implementations). For example, System.Net.Http.
    • The. NET Core meta-Package describes each layer and application model by referencing the appropriate combination of library packages with versions.
System structure

. NET core is a cross-platform. NET implementation. The primary architecture that is unique to. NET core is to provide platform-specific implementations for supported platforms.

Environment

. NET Core is powered by Microsoft on Windows, MacOS, and Linux. On Linux, Microsoft primarily supports. NET Core running on Red Hat Enterprise Linux (RHEL) and the Debian distribution series.

. NET Core currently supports X64 CPUs. On Windows, X86 is also supported. ARM64 and ARM32 will be supported.

For more detailed information about workloads and OS, and CPU environment support and scheduling, see. NET Core Roadmap (. NET core product family).

For other app types and environments, other companies or groups may support. NET Core.

Designed for adaptability

Compared to other. NET products, the resulting. NET Core is very similar to them, but unique. The goal is to be able to adapt to a wide range of new platforms, new workloads and new compiler toolchain. It has multiple OS and CPU ports in use and can be ported to more ports. As an example of the LLILC project, it was a prototype that was natively compiled by the LLVM compiler in earlier. NET Core.

The product is divided into several parts that enable the individual components to adapt to the new platform according to different plans. The runtime and platform-specific base libraries must be ported as a unit. Platform-agnostic libraries should run as built on all platforms. There is a bias in the project for reducing the platform-specific implementation to improve developer efficiency, but the platform-independent C # code should be preferred whenever an algorithm or API can be implemented in all or part of this way.

People often ask how to implement. NET Core to support multiple operating systems. They also ask if there is a separate implementation, or whether to use conditional compilation (conditional compilation). Both are used, but are strongly biased towards conditional compilation.

You can see in the chart below that most Corefx are platform-independent code that can be shared across all platforms. Platform-independent code can be used as a single portable assembly for use on all platforms.

Windows and Unix implementations are similar in size. Windows has a large implementation because COREFX implements some features that are only available for Windows, such as Microsoft.Win32.Registry, but has not yet implemented any concepts that apply only to Unix. You will find that most Linux and MacOS implementations are implemented in the Unix implementation, while Linux and MacOS-specific implementations are roughly the same size.

In. NET Core, there are platform-specific and platform-agnostic libraries. You can view the patterns in several examples:

    • The CoreCLR is platform-specific. It is built using C/s + +, so it is platform-specific, depending on the construct.
    • Given the significant differences in storage and encryption APIs on each OS, System.IO and System.Security.Cryptography.Algorithms are platform-specific.
    • Given that they are created and manipulated through data structures, System.Collections and System.Linq are platform-independent.
Comparison with other. NET Platforms

Comparing. NET Core to an existing platform is probably the simplest way to understand its size and shape.

Comparison with the. NET Framework

The. NET platform was first released by Microsoft in 2000 and has since developed. For more than 15 years, the. NET Framework has been the primary. NET product produced by Microsoft.

The main differences between the. NET Core and the. NET Framework are:

    • The application model--. NET Core does not support all. NET Framework application models, because many of these models are based on Windows technology, such as WPF (based on DirectX generation). However, both the. NET core and the. NET Framework support both the console and the ASP.
    • The API--. NET Core contains many APIs that are the same as the. NET Framework, but with a small number, and have different constituent features (different assembly names; Type shapes in critical use cases are different). Currently, these differences typically require changes to migrate the source to. NET Core. NET core implementation of the. NET Standard library API, which will grow over time to include more. NET Framework BCL APIs.
    • The subsystem--. NET Core implements the children of the subsystems in the. NET Framework to achieve a simpler implementation and programming model. For example, code access security (CAS) is not supported, but reflection is supported.
    • The platform--. NET Framework supports Windows and Windows Server, while NET Core also supports MacOS and Linux.
    • Open source--. NET Core is an open source, while a read-only subset of the. NET Framework belongs to an open source.

Although. NET Core is unique and very different from the. NET Framework and other. NET platforms, sharing code using source or binary sharing technology is still simple.

Compare with Mono

Mono is the original cross-platform and open source. NET implementation, first released in 2004. You can think of it as a community clone of the. NET Framework. The Mono project team relies on the open. NET standards published by Microsoft, specifically ECMA 335, for compatibility.

The main differences between. NET Core and Mono are:

    • Application Model--Mono supports a subset of the. NET Framework Application Model (for example, Windows Forms) and other application models (for example, Xamarin.ios) through Xamarin products. These content is not supported by. NET Core.
    • API-Mono uses the same assembly name and component elements to support a large subset of. NET Framework APIs.
    • Platform-Mono supports many platforms and CPUs.
    • Open Source-Mono and. NET Core both use the MIT license and are part of the. NET Foundation project.
    • Focus-In recent years, Mono's main focus has been on mobile platforms, while. NET Core focuses on cloud workloads.

[. NET core] Introduction (GO)

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.