9

Does anybody know how to generate entity framework code first migrations without having to use the package manager console?

I'm having a significant problem whereby on occasion running add-migration or update-database causes visual studio to freeze. I end up having to kill the process and restart visual studio to be able to start working again, and its very annoying.

I've had no luck tracking the issue down, and am trying to separate the generating and running of migrations from visual studio. I've found the article below which explains how to run migrations, but it doesn't generate migrations.

https://msdn.microsoft.com/en-us/data/jj618307.aspx

Any help would be greatly appreciated

Matt Whetton
  • 6,616
  • 5
  • 36
  • 57
  • The console is just Powershell running inside VS. Can't you just run a standalone PS window and import the libraries needed? – DavidG Jun 08 '15 at 13:18
  • I don't think its quite that simple (ref: http://stackoverflow.com/questions/12238640/how-to-run-code-first-migrations-from-a-psake-build) – Matt Whetton Jun 08 '15 at 13:33
  • Hmm interesting indeed. Have you tried to reinstall VS? Sounds like you are going to spend a lot of time on this and it may just be easier to do a fresh install. – DavidG Jun 08 '15 at 13:40
  • Are you running VS in admin mode? – Rob Tillie Jun 08 '15 at 13:42
  • I haven't tried re-installing visual studio so that is an option. And yep - I'm running in admin mode. I have tried suspending resharper but that didn't help. The only other thing is that I'm running the Xamarin VS plug-in, which I haven't tried to disable / remove yet (so that is also an option) – Matt Whetton Jun 08 '15 at 13:46

0 Answers0