153

There is a framework-level navigation element at Microsoft Docs called ".NET Platform Extensions". It contains docs on recently added APIs like System.IO.Pipelines and System.Threading.Channels for example, as well as a whole bunch of other APIs, including the not-so-recent ones.

Some APIs from this collection are available as nuget packages (for both .Net Core and .Net Framework), but others are not seemingly available. Also, as of now, there is no nuget package called ".NET Platform Extensions" or anything similar.

So, the question is what exactly does this collection of APIs represent? What is it's relationship to each of the following:

  • .Net Framework
  • .Net Core
  • .Net Standard

What about support in the .Net Framework / .Net Core?

Finally, some APIs seem to be already available as separate nuget packages, others are yet to be made available, so what is the story in that regard?

Fit Dev
  • 3,413
  • 3
  • 30
  • 54
  • 11
    As [.NET - Introducing the Windows Compatibility Pack for .NET Core](https://msdn.microsoft.com/en-us/magazine/mt814807.aspx) puts it, the "Platform Extensions" are for APIs which aren't part of a platform (Core or Standard) but are available via Nuget. You wouldn't expect a single all-encompassing Nuget package for this. – Damien_The_Unbeliever Nov 01 '18 at 08:53
  • 4
    does this mean that if I use the extension pack e.g DirectorySearcher API I will the possibility to use the same code on a Linux container while running .NET core 2.2. Thanks – Rishabh Jain Feb 01 '19 at 12:44
  • Try out https://apisof.net – n0099 May 12 '23 at 02:37

2 Answers2

113

It represents APIs that are shipped as NuGet packages instead of being part of the shared framework for .NET Core.

We don't have the ability right now to identify the different packages and which target frameworks they support on learn.microsoft.com, but it's something that is in our backlog to solve. So adding that as a new target enabled us to add docs for the new APIs.

Maíra Wenzel - MSFT
  • 2,544
  • 2
  • 14
  • 11
  • 19
    It is not clear what really is part of Platform Extensions, for example `Microsoft.Extensions.Logging.Logger` class (part of `Microsoft.Extensions.Logging.Abstractions.dll`) is listed under .NET Platform Extensions, but it is part of ASP.NET Core 3.1 shared framework – Ivan Jan 23 '20 at 06:00
  • 1
    It's poorly named, but the nuget package for the .net Platform Extensions is called Microsoft.Windows.Compatibility. Sure would be nice if they fixed their documentation to use the same name. https://www.nuget.org/packages/Microsoft.Windows.Compatibility – Bill Tarbell May 26 '22 at 19:27
  • It seems to be much improved: on the top of the page it contains "Package" with the exact name of the Nuget package that contains this class. at the bottom you have the "Applies to" section that indicates where you can use it ( ".NET Platform Extensions" in this context means "Net Core") – Puschie Aug 31 '23 at 09:21
9

You can use Windows Compatibility Pack, if you want to target windows platform only as start of porting process and gradually use platform independent alternative from .NET core OR .NET Standard.

Refer for more detail: https://learn.microsoft.com/en-us/dotnet/core/porting/windows-compat-pack

The Windows Compatibility Pack is provided via the NuGet Package Microsoft.Windows.Compatibility and can be referenced from projects targeting .NET Core or .NET Standard.

Please refer NuGet link for more detail: https://www.nuget.org/packages/Microsoft.Windows.Compatibility and you can use it by executing below command:

Install-Package Microsoft.Windows.Compatibility -Version 3.1.0
Nikunj Banker
  • 717
  • 7
  • 7