且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2012数据库项目中未解决的参考

更新时间:2023-01-31 20:47:36

您***的选择是为您的项目添加数据库引用.对于VS2010和更低版本的DBProj文件,您将需要生成dbschema文件并将其添加为数据库引用.对于SSDT,您需要使用dacpac文件.这对于大多数静态项目非常有效,您甚至可以对其进行裁剪以仅包含相关对象.

Your best bet is to add a database reference to your project. For VS2010 and lower DBProj files, you'll want to generate a dbschema file and add it as a database reference. For SSDT, you'll want to use a dacpac file. This works well for projects that are mostly static and you can even tailor them down to just include the objects that are relevant.

VS2010、2008- http://msdn.microsoft.com/zh-cn/library/dd193283%28v=VS.90%29.aspx 提供了将现有数据库导出到dbschema文件中所需的文档.将其放在您的项目可以访问的位置,并将其添加为数据库参考".

VS2010, 2008 - http://msdn.microsoft.com/en-us/library/dd193283%28v=VS.90%29.aspx has the documentation you'll need to export an existing database into a dbschema file. Place it somewhere your project can access it and add it as a "Database Reference".

SSDT- http://msdn. microsoft.com/en-us/library/hh550080%28v=VS.103%29.aspx 提供了用于生成dacpac文件的命令行参考.生成后,将其放置在您的项目可以访问的位置并添加为数据库引用.

SSDT - http://msdn.microsoft.com/en-us/library/hh550080%28v=VS.103%29.aspx gives you the command line reference for generating a dacpac file. Once generated, place it somewhere your project can access it and add as a database reference.

我在此处有关于SSDT的博客文章: http://schottsql.blogspot.com/2012/10/ssdt-external-database-references.html

I've got a blog post on this for SSDT here: http://schottsql.blogspot.com/2012/10/ssdt-external-database-references.html