0
votes

I'm working through an asp.net core web app project. The project instruction is done using asp.net core 2.1, but provides documentation for working through on asp.net core 3.0. I am using asp.net core 3.0 and have had no issues until this point, and there is no documentation provided to resolve the issue.

The current portion is transitioning to an entity framework core data structure using SQL. I installed all the necessary entity framework core packages (version 3.1.3). To begin initializing, the instructions are to access the entity framework through the command line using 'dotnet ef' to review all available tools.

The ef tools are not immediately visible calling 'dotnet -h'. Following the Microsoft documentation, I tried to call 'dotnet tool install --global dotnet-ef' to make it available. I receive the following error;

'error NU1202: Package dotnet-ef 3.1.3 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any. Package dotnet-ef 3.1.3 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any'

When going to create an asp.net core web app, the latest version I have available is 3.0.

I've tried scaling the entity framework versions back to 3.0, but still receive the same error.

What am I doing wrong / what can I try to be able to access 'dotnet ef' from the console?

1

1 Answers

1
votes

you have to install Microsoft.EntityFrameworkCore.Tools and Microsoft.EntityFrameworkCore.Design packages or use dotnet tool install --global dotnet-ef --version 3.0.0