我试图部署这是越来越在App海底下面的生成错误的实例部署数据库无法在App港
Build FAILED.
"D:\temp\gcp22bmp.ggi\input\src\ShareBill.sln" (default target) (1) ->
"D:\temp\gcp22bmp.ggi\input\src\Sharebill.Database\Sharebill.Database.dbproj" (default target) (5) ->
D:\temp\gcp22bmp.ggi\input\src\packages\TeamData\Microsoft.Data.Schema.SqlTasks.targets(5,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [D:\temp\gcp22bmp.ggi\input\src\Sharebill.Database\Sharebill.Database.dbproj]
0 Warning(s)
1 Error(s)
我知道这是因为通常存在这里的SQL目标 - Ç :\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ TeamData
不存在于部署服务器上。
现在应该怎么做才能部署数据库?有没有其他的方式来部署数据库。我在EF中没有先使用代码,但我仍然希望自动应用db迁移。
我假设如果我得到的数据库项目运行它会自动找到架构差异并将更改应用到数据库。
我还没有使用的数据库项目,但如果你已经使用实体框架,这种方法可能会更好:http://blog.appharbor.com/2012/04/24/automatic-migrations-with-entity-framework-4-3 – friism 2012-08-10 07:08:59
谢谢,我已经阅读过这个文档。我想知道它是否也适用于我,因为我在EF中使用Model第一种方法,而不是第一种方法。 – Tushar 2012-08-10 07:34:54