在 Visual Studio 之外使用 NuGet 包管理器控制台运行实体框架迁移 [英] Using NuGet Package Manager console outside Visual Studio to run Entity Framework Migrations
问题描述
有没有办法在 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
基本上我想在没有 Visual Studio 但有 PowerShell 2.0 和 NuGet 命令行工具的环境中运行 Update-Database –Verbose
命令.
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:
packagesEntityFramework.4.3.1 oolsmigrate.exe
请参阅 http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-released.aspx
这篇关于在 Visual Studio 之外使用 NuGet 包管理器控制台运行实体框架迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!