C
C#6mo ago
Rettox

Super noob - Trying to add/create a migration in VSCode

Ok im doing this tutorial book https://s3.amazonaws.com/recaffeinate-files/LittleAspNetCoreBook.pdf page 53 "dotnet ef migrations add AddItems" this is not working returning Could not execute because the spec command or file is not found I installed Nuget, and tried to install Microsoft.EntityFrameworkCore.Tools. but it has returned Install-Package : No match was fou nd for the search.... I Installed Entity Framework extension . still no luck. Any ideas what im missing .
No description
No description
No description
No description
No description
9 Replies
Angius
Angius6mo ago
dotnet tool list --global
❯ dotnet tool list --global
Package Id Version Commands
--------------------------------------------------------------------------
dotnet-ef 8.0.0 dotnet-ef
❯ dotnet tool list --global
Package Id Version Commands
--------------------------------------------------------------------------
dotnet-ef 8.0.0 dotnet-ef
should list dotnet-ef If it does not, dotnet tool install -g dotnet-ef
❯ dotnet tool search dotnet-ef
Package ID Latest Version Authors Downloads Verified
---------------------------------------------------------------------------------------
dotnet-ef 8.0.0 Microsoft 35719838 x
dotnet-mgfxc 3.8.1.303 MonoGame Team 13041
dotnet-encrypt 2019.12.1 Crypteron 2094
mustate 1.0.1 SamirKharchi 741
ctyar.ef-contrib 0.1.0 Shahriyar Qulami 492
xunit-cli 0.1.16 Nate McMaster 34014
❯ dotnet tool search dotnet-ef
Package ID Latest Version Authors Downloads Verified
---------------------------------------------------------------------------------------
dotnet-ef 8.0.0 Microsoft 35719838 x
dotnet-mgfxc 3.8.1.303 MonoGame Team 13041
dotnet-encrypt 2019.12.1 Crypteron 2094
mustate 1.0.1 SamirKharchi 741
ctyar.ef-contrib 0.1.0 Shahriyar Qulami 492
xunit-cli 0.1.16 Nate McMaster 34014
as you can see, that's what it's listed as -g to install it globally The Install-Package is for VS 2022 package manager console Since you're using VS Code, you want dotnet CLI instead @Rettox
Rettox
Rettox6mo ago
ahh thanks heaps , its def not installed now not sure if this worked
Rettox
Rettox6mo ago
No description
Rettox
Rettox6mo ago
but its in here
Rettox
Rettox6mo ago
No description
Rettox
Rettox6mo ago
@ZZZZZZZZZZZZZZZZZZZZZZZZZ
Angius
Angius6mo ago
Yeah, seems it's installed
Rettox
Rettox6mo ago
seems to be working as intended now, thanks alot mate 🙂
Angius
Angius6mo ago
Nice