Introduction to. NET Standard

Source: Internet
Author: User

Straight
    • . NET Standard is a set of APIs that all platforms must implement. This will be unified. NET platform and prevent future fragmentation.
    • . NET Standard will also implement the. NET Framework,. NET Core, Xamarin.
    • . NET standard contains a compatibility layer for a. NET Framework binary file.
    • . NET standard replaces the Portable Class library (PCL).
    • The. NET standard API definition on GitHub
Why do we need a standard

Let out a picture, you can quietly look at a minute

It can be seen that there are currently three main types. NET type, which means you have to master three different base class libraries to write code that works for all class libraries.

For developers, the main problem with the current three branches is that it is difficult to know exactly what features are available for each platform, which can be extremely inconvenient. NET developer Gaprogman that this would cause developers to overuse conditional compilation (Conditional compilation), adding that the portable Class Library (PCL) is no longer easy to transplant, Because developers cannot easily ensure that the APIs they need are still available on the target platform. According to Microsoft, using. NET Standard instead of PCL as the underlying foundation for writing multiplatform. NET libraries can solve this problem.

However, Microsoft MVP Rick Strahl points out that. NET standard should be seen as a specification that describes "at least what specific implementation needs to be selected in terms of API interfaces, such as. NET Core, Mono, Xamarin, or. NET 4.6". In other words,. NET standard itself is not an implementation, but rather a. NET underlying platform implementation. For example, he argues that. NET core implements the current version of. NET Standard 1.6, and he believes that. NET core 1.2 will be very close to. NET 2.0, making it a superset of. NET Standard 1.6.

The. NET Standard comes

for developers, this means that they only need to master a base class library. targeted. NET Standard library will be able to run on all. NET platforms.

What's in. NET Standard

Here is a high-level summary of the. NET Standard 2.0 API

Please note that the. NET Standard 2.0 is an ongoing work, which means that some APIs may be added and some may be deleted.

Summarize

Microsoft has created. NET standard so that it can be in more than one. NET platform to share and reuse code.

use. NET Standard 2.0, we focus on compatibility. to support. NET Standard 2.0 in. NET core and UWP, we will extend these platforms to include more existing APIs. This also includes a compatibility gasket that allows you to reference binaries compiled from the. NET framework.

forward, we recommend that you use. NET standard library, rather than a portable class library. used for positioning. NET Standard 2.0 will have the same release time as the upcoming release of Visual Studio (codenamed "Dev 15"). you will reference. NET Standard as a nuget package. It will get the visual Studio,vs code and first-class support for Xamarin Studio.

Introduction to. NET Standard

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.