NotSupportedOnTargetFramework was used to explicitly make a package fail
to install (due to ref/lib guardrails check) where it would otherwise
succeed. This is no longer serving its purpose since NuGet removed the
guardrails check. It's also creating a less desireable failure mode:
FileNotFound vs PlatformNotSupported.
Commit migrated from https://github.com/dotnet/corefx/commit/e7533ab2c24728a5937bfb68609e183833359b27
Previously I excluded reference assembly and package projects from
OSGroup derived properties. This is actually unnecessary, the reason
I was doing this before actually turned out to be issues with the usage
of OSGroup from builds files for pkgproj's.
Commit migrated from https://github.com/dotnet/corefx/commit/153c25729c66348f02655c031e1d4f572093cc98
This adds dummy implementations for platform specific API. The
implementation assemblies throw PlatformNotSupported for all methods.
This will satisfy NuGet's guardrails check and also let folks compile
against these assemblies and load them at runtime without JIT failures.
We will not be placing these packages in any of the shared-framework
layouts, nor should any of these ever be depended on by CoreFx
libraries. But we will provide them to enable folks to write platform
lightup code without having to worry about using reflection or guarding
calls in separate methods disabling JIT inlining.
These assemblies are marked with AssemblyMetadata("NotSupported",
"True"), so that future dev-time tooling can detect them and warn/error
in the case of accidental dependence on platform specific API.
One notable difference is
System.Runtime.InteropSerivices.WindowsRuntime: this assembly was
previously part of portable profiles and implementation exists in
mscorlib. For this we will forward to mscorlib on all platforms and it
is up to mscorlib to determine implementation (throw vs noop).
Fixes https://github.com/dotnet/corefx/issues/6684
Other platform specific contracts that have been excluded:
System.IO.IsolatedStorage: currently only supported for netcore50 so no
need to address this problem for x-plat.
System.Runtime.WindowsRuntime & System.Runtime.WindowsRuntime.UI.Xaml:
both are WinRT specific and not exposed in any PCL profiles that we
expect folks to use with x-plat NET core.
Commit migrated from https://github.com/dotnet/corefx/commit/b12b5604c442c13b983f530e5bccfc0867f160cf