2 comments

  1. Hi Jonathan, very nice article.
    Can you spend a few words about cross platform compatibility?

    I mean, Now I can instanciate a Full Framework class if it’s part of .NET Standard (First, how do I know if it’s Standard 2.0 or Standard 1.0?).

    Let’s say it’s Standard 2, will it be working on Linuz with .NET Core 2.0 installed?

    Thanks!

    Matteo Beantwoorden

    • Apologies for the late reply. For some reason I didn’t get a notification that a comment was placed.

      As for your question, you can look up what API’s are supported in what versions of .NET Standard on the .NET Standard GitHub repository (https://github.com/dotnet/standard/tree/master/docs/versions). Or you can look up the API at https://apisof.net/ to see if it is supported in .NET Standard and since which version.

      If the API is part of a version of .NET Standard you can be certain that it is supported on any platform that supports that version. For example, if we look up System.Console.WriteLine() at https://apisof.net/catalog/System.Console.WriteLine() you’ll see that it is supported since .NET Standard 1.3. By looking at https://docs.microsoft.com/en-us/dotnet/standard/net-standard we’ll see that .NET Standard 1.3 is supported by .NET Core 1.0, .NET Framework 4.6 and various other platforms, so it will run without problems on Linux with .NET Core 1.0 installed.

      If we look at System.AppDomain however (https://apisof.net/catalog/System.AppDomain), we’ll see that that API is only supported in .NET Standard 2.0. That version of .NET Standard 2.0 isn’t supported by .NET Core 1.0, so it won’t work there. It is supported in .NET Core 2.0 however.

      I hope that answers your question.

      Jonathan Mezach Beantwoorden