Unrecognized option '-Context' when running dotnet ef command
lukeconner opened this issue · 4 comments
lukeconner commented
Describe the bug
When following the commands to install, after dotnet restore it gives the error Unrocognized option '-Context'
To Reproduce
Steps to reproduce the behavior:
- Clone Project
- Change connection string
- Run dotnet restore
- Run dotnet-ef database update -Context ApplicationDbContext
Expected behavior
I expected it would create the tables
Desktop (please complete the following information):
- OS: Windows 10
- 3.1 SDK installed
lukeconner commented
I have no idea why this is an issue, but using -c instead of -Context resolved the issue.
iammukeshm commented
That's weird. Is your ef code updated to the latest version?
lukeconner commented
Yeah, I reinstalled the SDK just to be sure. Likely it's something with my local setup.
khaledafify commented
dotnet-ef database update -c ApplicationDbContext
it will fix the problem