'Failure to Install Microsoft.AspNetCore.AppRef

When I tried installing Microsoft.AspNetCore.AppRef in my webapplication in .net core 3.1.

However, I get this error instead:

Package 'Microsoft.AspNetCore.App.Ref 3.1.3' has a package type 'DotnetPlatform' that is not supported by project 'xxxxxx'.             
NU1213 The package Microsoft.AspNetCore.App.Ref 3.1.3 has a package type DotnetPlatform that is incompatible with this project.         

Any ideas how to fix?



Solution 1:[1]

Acording to the package description on nuget:

This package is an internal implementation of the .NET Core SDK and is not meant to be used as a normal PackageReference.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 KyleMit