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?
According to Microsoft Learn, the correct way to reference the ASP.NET Core application assemblies from .NET Core 3.0 on is by adding a FrameworkReference, e.g.
<Project Sdk="Microsoft.NET.Sdk">
......
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With