locked
SSDT database references with same server / same database and F5 Debugging RRS feed

  • Question

  • Hi,

    I have difficulties to wrap my head arround how to set up a SSDT with database references.

    I have an example solution with two database projects:

    • libdb: This creates a table lib.Table1
    • appdb: This creates a view app.vlib which uses table lib.Table1

    With the standard setup for debugging (connection to "Server=(localdb)\Projects;Initial Catalog=<projectName>") the deployment fails when I hit F5. (Msg: Error:  SQL72033: This deployment may encounter errors during execution because [app].[vlib] depends on [lib].[Table1] and [lib].[Table1] does not exist in the target database.)

    I was expecting that SSDT would deploy the objects from referenced database projects with same server/same database setting into the target.

    The only way I got this to work was setting the debugging connection to "Server=(localdb)\Projects;Initial Catalog=test" to deploy all objects to the same target database.

    Is this the way to set up a solution to enable debugging?


    Kind Regards

    Ralf


    ralf


    • Edited by ralfkret Thursday, October 4, 2012 11:54 AM
    Thursday, October 4, 2012 11:44 AM

Answers

  • Hi Ralf,

    Good question.  Yes, you can deploy both project in a single debug operation by enabling the "Include Composite Objects" option.  This option is found under the Advanced button of the Debug tab in the project properties. 

    -Janet Yeilding

    • Proposed as answer by Janet Yeilding Thursday, October 4, 2012 4:56 PM
    • Marked as answer by ralfkret Friday, October 5, 2012 12:57 AM
    Thursday, October 4, 2012 4:56 PM

All replies

  • Hi Ralf,

    Good question.  Yes, you can deploy both project in a single debug operation by enabling the "Include Composite Objects" option.  This option is found under the Advanced button of the Debug tab in the project properties. 

    -Janet Yeilding

    • Proposed as answer by Janet Yeilding Thursday, October 4, 2012 4:56 PM
    • Marked as answer by ralfkret Friday, October 5, 2012 12:57 AM
    Thursday, October 4, 2012 4:56 PM
  • Hi Janet,

    thank you very much for the tip. Very helpfull!

    I just noticed this is a per user setting and as such it is stored in the sqlproj.user file. So when I get a solution fresh from source control I'll have to reapply the setting.



    ralf

    Friday, October 5, 2012 1:15 AM
  • Hi Janet..

    I tried enabling this setting and it seems to not have worked for dacpac references.   I have one SSDT project that has 2 db dacpac references.  What's the best way to get those dacpacs up to LocalDB for Debugging? 

    Thanks!

    -Jeff

    Monday, December 17, 2012 3:49 PM