简体   繁体   English

TFS VNext构建和实体框架迁移-Visual Studio Team Services(曾是Visual Studio Online)

[英]TFS VNext Build and Entity Framework Migrations - Visual Studio Team Services (was Visual Studio Online)

I'm building a .Net app using Entity Framework. 我正在使用实体框架构建.Net应用程序。

I have TFS vNext Builds setup and I'm doing auto publish to an azure web app. 我有TFS vNext Builds设置,并且正在自动发布到Azure Web应用程序。

I'd like to add a build task to automate my entity framework changes. 我想添加一个构建任务来自动执行我的实体框架更改。

I'm using code first and have migrations enabled, so I need a task that will run my migrations during the build to make any database schema changes, and seed test data that needs to be added/updated to the database. 我首先使用代码并启用了迁移,所以我需要一个任务,该任务将在构建期间运行我的迁移以进行任何数据库模式更改,并为需要添加/更新到数据库的测试数据提供种子。

Essentially I'd like to get the process used by ReadyRoll http://www.red-gate.com/products/sql-development/readyroll/ Without having to spend $350 per licence. 从本质上讲,我想获得ReadyRoll使用的过程http://www.red-gate.com/products/sql-development/readyroll/而不必花费每个许可证350美元。

You can install EntityFramework nuget package to your project. 您可以将EntityFramework nuget软件包安装到项目中。 And then restore the nuget package and call "migrate.exe" in the package folder to run the migration. 然后还原nuget程序包,并在程序包文件夹中调用“ migrate.exe”以运行迁移。 Refer to this question for details: How can I run Entity Framework's migrate.exe from Visual Studio Online? 有关详细信息,请参阅此问题: 如何从Visual Studio Online运行实体框架的migration.exe?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Visual Studio Team Services项目源代码管理中使用实体框架 - Using Entity Framework in Visual Studio Team Services Project Source Control 实体框架6迁移-Visual Studio 2015 - Entity Framework 6 Migrations - Visual Studio 2015 Visual Studio 2015和实体框架迁移不起作用 - Visual Studio 2015 and Entity Framework Migrations not working 使用Visual Studio 2013在Entity Framework 5中无法启用enable-migrations - enable-migrations not woking in Entity Framework 5 using Visual Studio 2013 实体框架迁移使用Visual Studio 2013时出错 - Entity Framework Migrations Error using Visual Studio 2013 Visual Studio Online无法构建项目,因为Entity Framework引用无法解析 - Visual Studio Online cannot build project due to Entity Framework reference cannot be resolved Visual Studio 2013数据库项目如何与TFS在线和EntityFramework代码首次迁移一起使用 - How do Visual Studio 2013 Database Projects work with TFS online and EntityFramework code first migrations Visual Studio中的Oracle和实体框架 - Oracle and entity framework in visual studio Visual Studio 2013和实体框架 - Visual Studio 2013 and Entity Framework 实体框架4 Visual Studio 2008 - Entity Framework 4 Visual Studio 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM