.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
Retail Realm’s package that targets .NET 6.0 cannot be used directly in an application that targets .NET Standard 2.0. A .NET 6.0 assembly is not compatible “downwards” with .NET Standard 2.0; compatibility flows the other way (for example, net6.0 is compatible with netstandard2.0, not vice versa).
For a NuGet package to be usable from a .NET Standard 2.0 application, the package must either:
- Target
netstandard2.0(or another framework compatible with your app’s target), or - Be multi-targeted and include a
netstandard2.0assembly alongside thenet6.0assembly.
When a package supports multiple frameworks, all assemblies for compatible frameworks must expose the same or a superset of the API surface so that consumers can compile against one TFM and run against another without MissingMethodException or TypeLoadException.
In this case, to use Retail Realm from a .NET Standard 2.0 application, Retail Realm would need to ship a multi-targeted package that includes a netstandard2.0 build (or another framework compatible with your app). Without such a compatible TFM in the package, the .NET Standard 2.0 application cannot consume the .NET 6.0-only package.
References: