I have been trying to migrate a context that is called IntegrationEventLogContext and is located in a different layer, but it is getting an error which says;
"dotnet : Could not execute because the specified command or file was not found"
I am using this command to migrate the context.
dotnet ef migrations add Initial -c IntegrationEventLogContext -p IntegrationEventLogEF -o Ordering.API/Infrastructure/IntegrationEventMigrations
In addition, I would like the migration files to be created in the location that I specified.
How can I migrate the context?
CodePudding user response:
I try to check for similar issues and it looks like the dotnet ef tool is no longer part of the .NET Core SDK
You could try to perform the steps below.
- Run the command prompt as an Administrator.
- Execute the command below to install dotnet ef tool.
dotnet tool install --global dotnet-ef
Run the command below to install any specific version.
dotnet tool install --global dotnet-ef --version {{dotnetef_version}}
Reference: