Circular Links in Visual Studio Database Edition

I am using Visual Studio Database Edition to script multiple databases. Many databases have links between them - for example, a view in database A can make a choice ... from B..TableX

This works great as database B is also a project in the solution. The problem comes when I have objects in the database. Database B reference and database B referring to objects in database A. It seems that Visual Studio needs to build projects in an order that is not possible in this case.

How do you deal with circular links between database projects in the Visual Studio Database Edition?

+2


source to share


2 answers


Definitely a hassle. I considered this by initially setting individual objects in project A that depend on project B to "not build" (right click object> properties). Then we build the project. Once this is complete, you can build project B. Then go back and put the objects in Project A back in "build".



+1


source


We've usually found ways to simply avoid circular references altogether, just like with .NET or most other languages ​​other than database. (ex: move stuff in A that depends on B to new database, C)



It hurts a bit to migrate tables and views to do this, but when it comes time to do automatic database deployments, it makes the process much easier than doing partial builds of each database with a second step back and done.

0


source







All Articles