Compatibility Matrix - (.NET Standard Versions)
The .NET Standard is a formal specification of the APIs that are available across multiple .NET platforms. It defines a set of common APIs that can be used across multiple .NET platforms, including .NET Framework, .NET Core, and Xamarin. In this tutorial, we'll discuss the compatibility matrix for various .NET Standard versions.
Syntax
The .NET Standard version is specified in the csproj
file or by selecting it from the list of available target frameworks in Visual Studio.
<TargetFramework>netstandard2.0</TargetFramework>
Example
Let's take a look at an example of the compatibility matrix for .NET Standard versions:
.NET Standard Version | .NET Framework Version | .NET Core Version | Xamarin Version |
---|---|---|---|
1.0 | 4.5 | 1.0 | N/A |
1.1 | 4.5.1 | 1.0 | N/A |
1.2 | 4.5.1 | 1.0, 1.1 | N/A |
1.3 | 4.6 | 1.0, 1.1 | N/A |
1.4 | 4.6 | 1.0, 1.1, 2.0 | N/A |
1.5 | 4.6.1 | 1.0, 1.1, 2.0 | N/A |
1.6 | 4.6.1 | 1.0, 1.1, 2.0 | N/A |
2.0 | N/A | 2.0, 2.1, 2.2 | N/A |
2.1 | N/A | 2.1, 2.2, 3.0 | Xamarin.iOS 10, Xamarin.Android 7.0, UWP 10.0.16299 |
2.2 | N/A | 2.1, 2.2, 3.0 | Xamarin.iOS 10, Xamarin.Android 7.0, UWP 10.0.16299 |
2.3 | N/A | 2.1, 2.2, 3.0 | Xamarin.iOS 10, Xamarin.Android 7.0, UWP 10.0.16299 |
Explanation
The compatibility matrix for .NET Standard versions shows which versions of the .NET Framework, .NET Core, and Xamarin are compatible with each version of the .NET Standard. The table above shows that earlier versions of .NET Standard are compatible with older versions of .NET Framework and .NET Core, while newer versions of .NET Standard require newer versions of .NET Framework and .NET Core.
Use
The compatibility matrix is a useful resource for developers who are building applications that need to run on multiple .NET platforms. By choosing a compatible version of the .NET Standard, developers can ensure that their applications will work across different platforms and versions.
Important Points
Here are some important points to keep in mind when working with the compatibility matrix for .NET Standard versions:
- The compatibility matrix shows which versions of .NET Standard are compatible with which versions of .NET Framework, .NET Core, and Xamarin.
- Choosing a compatible version of .NET Standard ensures that your application will work across different platforms and versions.
- The availability of features in a specific .NET Standard version will depend on the specific platforms that it supports.
Summary
In this tutorial, we discussed the compatibility matrix for various .NET Standard versions. We covered the syntax, example, explanation, use, and important points of the compatibility matrix. By understanding the compatibility matrix, developers can choose the appropriate version of .NET Standard for their applications and ensure that they work across different platforms and versions.