在Visual Studio外使用NuGet Package Manager控制台来运行实体框架迁移 [英] Using NuGet Package Manager console outside Visual Studio to run Entity Framework Migrations

查看:234
本文介绍了在Visual Studio外使用NuGet Package Manager控制台来运行实体框架迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否还可以在Visual Studio之外打开 NuGet 软件包管理器控制台?

Is there anyway to open NuGet Package Manager console outside Visual Studio ?

我的目标是运行一些迁移,我使用 EntityFramework.Migrations

My objective is to run some migrations, which I created using EntityFramework.Migrations

基本上我想运行 Update-Database -Verbose 命令在没有visual studio的环境中,但是具有PowerShell 2.0和NuGet命令行工具。

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.

推荐答案

原始发布的答案是正确的,但现在(截至4.3)有一个migrate.exe,所以你不需要nuget或powershell:

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

请参阅 HT tp://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-released.aspx

这篇关于在Visual Studio外使用NuGet Package Manager控制台来运行实体框架迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆