I have PC1, which I install packages on, when I get my code from Version control on PC2, I get the error message: "Add-Migration" and "Update-Database" "is not recognized as the name of a cmdlet, function, script file" etc.
I've looked at other posts here, but nothing helped. It only happens when I switch PC's and it can be fixed by uninstalling and reinstalling the package.
I also get an issue, that says, the package isn't digitally signed, which I can get around by doing a Set-ExecutionPolicy Bypass -Scope Process but it is very annoying.
How can I fix/prevent this permeanently?
If you use package restore, go to Package Manager Settings and set "Allow NuGet to download missing packages during build", then build your project or restore your packages. After that, restart Visual Studio and the commands should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With