1
votes

I want to know if .NET Core 3.1 is backward compatible with .NET Core 2.1. I am getting below error while adding a nuget package(say package X) targeting .netcoreapp2.1 to my .netcoreapp3.1 project:

NU1202: Package is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package supports: netcore21 (.NETCore,Version=v2.1)

1

1 Answers

0
votes

Note that the TFM netcore21 is not .NET Core 2.1. Because the TFM netcorexx has been taken by some former deprecated platform that used to be called ".NET Core", which is not the well known .NET Core at all.

The proper TFM for .NET Core is netcoreappx.x (to be distinguished from the deprecated platform).

Thus this is irrelative to backward compatibility problem. And the nuget package that you are trying to add does not ever target any version of .NET Core.