How to fix Add-Migration: Exception calling "Start" with "1" argument(s):

Sonya 10 Reputation points
2023-05-02T14:02:32.8+00:00

Hello everyone. I am trying to create a migration, but when I call "Add-Migration" I get an error:

Add-Migration: Exception calling "Start" with "1" argument(s): "An error occurred trying to start process '/usr/local/bin/dotnet' with working directory '/Users/../server/Optimum.Api/'. No such file or directory"

Developer technologies .NET Entity Framework Core
{count} vote

1 answer

Sort by: Most helpful
  1. AgaveJoe 30,126 Reputation points
    2023-05-02T15:27:01.67+00:00

    Migrations require a name which is missing from the command and the reason for the error message. Please see the official documentation. Entity Framework Core tools reference - Package Manager Console in Visual Studio

    add-migration NameOfTheMigration
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.