Is there anyway to open NuGet Package Manager console outside Visual Studio ?
My objective is to run some migrations, which I created using EntityFramework.Migrations
Basically I want to run Update-Database –Verbose
command in an environment which does not have visual studio, but does have PowerShell 2.0 and NuGet command line tool.
Open the Package Manager Console from Tools → Library Package Manager → Package Manager Console and then run the enable-migrations command (make sure that the default project is the project where your context class is).
Add-Migration Adds a new migration. Remove-Migration Removes the last migration. Scaffold-DbContext Scaffolds a DbContext and entity type classes for a specified database. Script-Migration Generates a SQL script from migrations.
The original posted answer was right at the time, but now (as of 4.3) there is a migrate.exe so you don't need nuget or powershell:
packages\EntityFramework.4.3.1\tools\migrate.exe
See http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-released.aspx
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