Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell version on Windows 7 #101

Closed
mehrt opened this issue Jan 1, 2016 · 4 comments
Closed

Powershell version on Windows 7 #101

mehrt opened this issue Jan 1, 2016 · 4 comments

Comments

@mehrt
Copy link

mehrt commented Jan 1, 2016

If one follows the tutorial here and does so on a box running Windows 7, chances are that they'll receive the following error ...

The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:14
+ Add-Migration <<<<  MyFirstMigration
    + CategoryInfo          : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

... when trying to execute Add-Migration MyFirstMigration.

This is due to the fact that Powershell may be Version 2 or 3. It needs to be Version 4 for this to work.
I had this issue on two separate W7 boxes on which I tried playing with EF7, so I think other people may run into this as well. The first time it took me almost a day to figure this out. So a hint towards this in the tutorial may be a good idea.
Installing an update from here fixed it.

rowanmiller added a commit that referenced this issue Jan 4, 2016
For Package Manager Console commands you need PowerShell 3.0 or newer.
Adding this to the pre-req section. Doesn't apply to UWP since you need
Windows 10 for that anyway.
Resolves #101
@mehrt
Copy link
Author

mehrt commented Jan 5, 2016

Sorry, I didn't notice #99 being actually the same issue ...

@mehrt
Copy link
Author

mehrt commented Jan 13, 2016

The minimum version probably should also be mentioned here ...

@rowanmiller
Copy link
Contributor

@mehrt good point, change is out for review #109

@mehrt
Copy link
Author

mehrt commented Jan 18, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants