Database Projects for dbs that reference each other

  • Hi,

    This subject hasn't been discussed enough on the net yet - could do with opinions/experiences. We want to source control our databases using Visual Studio 2010/Team Foundation Server and so are setting up database projects. We have two databases that refer to objects in each other (surely not so uncommon). When creating the projects I need to create a database reference to the other database so that the project will build, but when I go to add the second reference (in the second db to reference the first) I get the message "A reference to library 'DB2' cannot be added. Adding this project as a reference would cause a circular dependency". Here http://social.msdn.microsoft.com/Forums/en/vstsdb/thread/fe31966c-4d75-44a1-9c4a-d49196d2ad1e the ubiquitous and ever helpful Jamie Thomson has said the answer is to use a composite project as explained: http://msdn.microsoft.com/en-us/library/dd193415.aspx.

    Is there really no better way? Has anyone out there tackled this issue?

  • Hmmm,

    I'll take that resounding silence as a "no - there's no better way" and "no, not many of us use this or have any experiences we want to share"...

    I went ahead and did this (leaving out server proj refs):

    DB1Main(leaving out objects that ref DB2) No refs

    DB2 refs DB1Main

    DB1Rest(objects that ref DBs) refs DB2 AND DB1Main

    And this works fine

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply