So it seems to be an open issue now. So I guess until this is done I will have to rely on .NET Core API reference and pray I won\'t hit one of the 43 API
I'm trying to find the .NET Standard API reference.
It's here. E.g., all the APIs for netstandard1.0. It's not as nice as the MSDN docs - yet. They're working on that. But if you want a list of specific APIs, it's there.
Their solution to this problem is to scan a given application?
Well, I think that's a lot easier than examining each line of your source code and looking it up in a document...
So if I start a new project, giving the fact that I don't have code written yet, I would target .NET Standard and pray I don't end up with unsupported APIs that are supposed to be?
If you target netstandard
, you won't be able to call any APIs that aren't in your netstandard
version. As a general rule, you should start by targeting netstandard1.0
and only move up if you need additional APIs.
Regarding "unsupported APIs", that's a completely different question. In that case, you're talking about a platform (like Xamarin.Android 7.0 or .NET 4.6.2) that declares support for a given netstandard
version but throws NotSupportedException
at runtime for some of the APIs. Unfortunately, that part of the story is very much TBD. What kind of tooling we'll have is still unknown at this point. There isn't anything today.
Also are there other cases like this in other frameworks like Xamarin or UWP?
Yes. Xamarin has always had this - they never fully supported the .NET APIs. UWP will have at least the same limitations as .NET 4.6.2.
What does that mean vNext exactly in the 2.0 column?
It means netstandard2.0
isn't going to be supported by the current versions of those platforms, but they're expecting to release a future version of those platforms that will support netstandard2.0
.
Should I be worried of other unsupported APIs in other frameworks
At this point, I wouldn't worry. There will eventually be some kind of a story around detecting unsupported APIs. You can get pretty far today just by running APIPort as a post-compile step.