.NET Standard API surface online reference

2019-09-15 01:33发布

问题:

I was just trying to figure out whether the type System.Windows.Input.ICommand is part of the new .NET Standard.

I did manage to compile a library using the type when the project target setting was set to .NETStandard1.0 (it also works when using a broad portable library API surface including .NET Core 1.0).

So, despite the odd namespace suggesting WPF involvement, and despite the namespace not being listed at this section of a CoreFX document it appears to be in it.

I wonder if there's also a more accessible reference one can browse to see what API is supported rather than just trying it.

Also, are the API surfaces fixed now, or can this change in the future? In other words, does the test I made give me an authoritative answer at all?

回答1:

https://docs.microsoft.com/en-us/dotnet/core/api/index has documentation for everything that was in .NET Core 1.0 (not including ASP.Net Core, which is technically a different product). That documentation site covers netstandard1.6 / netcoreapp1.0; but I don't offhand see a way to know when a type/member isn't available in lower versions of netstandard, so as you decrease your netstandard version (which increases the number of compatible platforms) some APIs might disappear (becoming compile errors).

netstandard1.0 through netstandard1.6 are stable, nothing will be deleted from them, and nothing will be added to them (new additional packages could be added which have them as the minimum dependency, but that's new API on a netstandard version).