A must have .NET Standard. Say goodbye?

With the .NET 5 announcement last year and subsequent announcements leading up to MSBuild 2020, a big question that arises is what happens to the .NET Standard. falls down.

Why our .NET Standard. We had Let's take a step back and see how and why NET Standard. Came into being. When .NET Core. First published, there was a dilemma. We already have all these libraries for the .NET Framework. Written, do we really want them all again for .NET Core. Write? Given that the majority of .NET Core. Basic part of the .NET Framework. For cross platform work, many signatures of methods and classes were the same (as far as we can tell, most of them were). Let's take an example. Let's say we want to open a file in our library using the standard File.ReadAllLines (string path) call. Now it happens that if you put this code in .NET Framework., .NET Core. Or even write Mono, it takes the same parameters (a string path variable), and returns the same thing (a string array). Now how does this call a file that is specific to a particular platform (eg .NET Core. And Mono may have specific code for the path of Mac files), but the result must always be the same, an array of strings from the file. So if we have a library that does nothing but open a file to read lines and return it, do we really have to republish this library multiple times for different frameworks? Well, this is where NET Standard comes in. It is entered. The easiest way to think about it is to define a list of classes and methods that each platform agrees to implement. So if File.ReadAllLines () is part of the standard, then we can be sure that our library can only be used once as a .NET Standard library. Publish, and work on multiple platforms. NET Standard. A way for different .NET platforms. Provides to share a collection of common method signatures that allow library builders to write code once and run it on different platforms. NET Standard. No longer needed Now that we are here, we hear that .NET Standard. No longer needed. And there are two main reasons for this: NET Core performance. From the .NET Framework. Has gone beyond. That is, new versions of NET Standard. They are hard to come by. Initially, .NET Core. A subset of the .NET Framework function. Was. So NET Standard. One method was almost stated, if you have a library for the .NET Framework. You wrote, how do you know that without special settings for .NET Core. Will work. Yes, NET Standard. It has also been used as a way to see performance on other platforms such as Mono, Xamarin, Silverlight and even Windows Phone. But we think most of the uses are for .NET Framework => .NET Core. Was. As NET Core. Has built its capabilities, in principle still trying to achieve feature equality with the .NET Framework. Had. So as soon as a new version of .NET Core is released. Every year, a new version of the .NET Standard. Was also published with it, which was almost exclusively looking for common method signatures within the .NET Framework <=> .NET Core. So finally NET Core. From the .NET Framework. He goes further, or at least says, "We do not carry anything extra. This step is essentially .NET Standard 2.0." But obviously NET Core. Does not stop and new features to .NET Core. Added to .NET Framework. are not. But NET Framework updates. At first they are small and the distance between them is large. So with the addition of new features to .NET Core., Do they make sense to add to the new standard version given that the .NET Framework. Will it never implement that standard? To some extent ... or at least they have tried. NET Standard 2.1. It was the latest standard release and was implemented by Mono and Xamarin, but not by the .NET Framework. So now we have a standard developed to describe equality between two large platforms, which one platform no longer wants to participate in. We mean we can implement the new standards, but if there is only one player, then this is a kind of lawsuit. Integration of .NET platforms About 6 months after the release of NET Standard 2.1. We found news that the .NET Framework. And .NET Core. On a single NET platform. Are called .NET 5.. Now we do not need a standard because our two platforms are trying to define equality that is actually one and the same. Now also have the fact that .NET 6. wants to include the Xamarin platform. Now all the charts from NET Standard. You see, the place where you tried to follow the columns to see which version to support is no more because now there is only one row, which is .NET 6.. There will be only one .NET platform in the future. No more Xamarin, no .NET Core., No Mono, no .NET Framework. are. NET only. Is. So you should use the .NET Standard. To stop? This is something that has been asked a lot lately. If all this becomes a platform, will we start writing libraries for .NET 5.? The answer is no. NET Standard. Still as a way to write libraries in the .NET Framework. Or older versions of .NET Core. Are available. Even today, when choosing the .NET Standard version. For a library, try to choose the least number to be sure of most platforms

supports. NET 5. Still for example NET Standard 1.0. Implements, so any library that targets the old standard is still on the latest version of the .NET platform. Runs. In a few years we will not be saying, "Oh, this library is for .NET Standard 2.1., Is it for .NET Core 2.1? No, this is for .NET Core 3+. ... Who knows?" Instead it's going to be, oh this library is for .NET 5. So it will work smoothly in .NET 7..

User:sinahabibi
2/10/2021
Visit:53
Article

.NET Standard .NET Versions. Introduction to Net 5. Is NET Standard Still. Is goodbye to .NET Standard. Future net. New version net.
You must be logged in to post a comment