.Net Core Classlib misrequires Microsoft.NETCore.App 2.0.0

Viewed 73

I'm currently on Ubuntu 20.10, when I create Classlib using dotnet new classlib, it works as expected. dotnet build builds, as net5.0 is written as TargetFramework in csproj file. But when I use dotnet ef migrations add Init, following error occures:

Build started...

Build succeeded.

It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.

The following frameworks were found: 3.1.14 at [/usr/share/dotnet/shared/Microsoft.NETCore.App] 5.0.5 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

What am I doing wrong? Feel free to stating RTFM (but provide link or direction please).

1 Answers

Okay, I figured it out. It is because of EntityframeworkCore.Design package. I had to install to proceed further.

Related