如何在Visual Studio 2013中创建数据库项目

如何在Visual Studio 2013中创建数据库项目

问题描述:

我正在迁移一个包含从Visual Studio 2008到VS2013的一些C#项目的解决方案。迁移进行得很顺利,只进行了一些调整,但还有一个.dbp项目(来自VS2008的数据库项目),拒绝在VS2013中迁移/加载。

I'm migrating a solution which contains some C# projects from Visual Studio 2008 to VS2013. The migration went fine, with a few adjustments, but there's also a .dbp project (database project, from VS2008), which refuses to migrate / load in VS2013.

我在这个较新版本中找到的最接近的项目类型是SQL Server数据库项目,我创建了一个并添加了我现有的.sql脚本文件,但是这个项目类型(.sqlproj)似乎有所不同。例如,VS 2008的数据库项目不是 build 。此外,我很难尝试添加对在SQLExpress下运行的现有SQL数据库的引用。

The closest project type I found in this newer version is "SQL Server Database Project", I've created one and added my existing .sql script files, but this project type (.sqlproj) appears to be something different. For example, VS 2008's "database project" does not build. Also, I had a hard time trying to add a reference to my existing SQL database running under SQLExpress.

我还为我的所有脚本文件设置了BuildAction = None,现在我可以手动打开它们并执行。但是,我想选择多个文件并一次执行所有文件。好像我错过了一些东西。

I've also set BuildAction = None to all my script files, and now I can open each of them manually and execute. But still, I'd like to select multiple files and execute them all at once. Seems I'm missing something.

那么,有没有办法实现呢?

So, is there a way to accomplish that?

我建议您查看以下文章将dbp转换为dbproj: MSDN

I suggest you look at the following article to convert the dbp to dbproj: MSDN

然后查看以下链接转换dbproj到sqlproj:触手软件博客

And after that look at the following link to convert dbproj to sqlproj: Tentacle Software Blog