why i cannot add migration in .NET Core CLI

83 Views Asked by At
PM> dotnet ef migrations add InitialCreate
Build started...
Build succeeded.
dotnet : The specified deps.json [C:\Users\Alif Firdaus\OneDrive\Documents\Project Jutanam\SurauApp\bin\Debug\net8.0-android\SurauApp.deps.json] does not exist
At line:1 char:1
    + dotnet ef migrations add InitialCreate
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The specified d... does not exist:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

enter image description here

I attempted to add a migration using the dotnet ef migrations add InitialCreate command, but I encountered an error message stating that the Entity Framework Core Package Manager Console Tools don't support Android platforms.

1

There are 1 best solutions below

0
Jalpesh Vadgama On

You are doing mix and match

Basically you are using dotnet cli command in visual studio if you want to use that then same do with dotnet cli

otherwise if you want to use visual studio then use the visual studio command like following

Add-Migration InitialCreate

In visual studio. For more reference see this link they have clearly mentioned both command

https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=vs