A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
Hi,@Arman Espiar. Welcome to Microsoft Q&A.
Judging from the current situation, this seems to be related to your environment. You could try the following methods.
Method 1
Configure environment variables correctly:
In Visual Studio 2022, open Terminal (View->Terminal) and run the dotnet --version command. If the .Net version could be successfully output, the environment variable configuration is successful. Of course, you could also delete the dotnet file in C:\Program Files, then re-download dotnet and install it. By default, it will automatically configure the dotnet operating environment for you.
Reinstall Entity Framework Core related packages:
Find Entity Framework Core related packages in C:\Users\{UserName}\.nuget\packages, delete them, and re-download them through Nuget
Method 2
Execute Code First commands in .Net Core CLI
Run commands in Terminal(View->Terminal)
dotnet ef migrations add ChangeSomething
dotnet ef database update
Related Documents: Migrations Overview - EF Core | Microsoft Learn
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.