Search code examples
c#.net-corenuget-package.net-standard

Are my NuGet packages compatible with .NET Core?


I was introduced to c# and visual studio yesterday and I know this is a very simple question. But we are porting code from .NET framework to .net CORE. My job is to install packages/libs that were present in the old code into the new code (The target framework of the solution is 2.1)

But how can I see in NuGet packet manager that a specific library is supported by CORE 2.1? For examples, can I see if this supports CORE on the image, or are all available packages compatible with core 2.0 since this is the target framework?

two muppets


Solution

  • The .NET Standard is... the standard / spec for .NET compliant languages. Each version of .NET (Core or Framework) is the implementation of that standard.

    .NET Core 2.0 and up are compatible with .NET Standard 2.0, as per the docs from MS:

    https://learn.microsoft.com/en-us/dotnet/standard/net-standard

    .NET implementation support

    In short, you'll want to look for frameworks that are compatible with .NET Standard 2.0 to port to .NET Core 2.2.

    Another useful link is an interactive compatibility tool from MS:

    https://dotnet.microsoft.com/platform/dotnet-standard#versions