Is there a way to maintain database references after branching

  • If I have a database reference to say, master or any other DB dacpac for that matter, in my Db project. When I branch my project in TFS the database reference in the branched version becomes invalid and I have to remove the reference and re-insert it to make it valid again. Is there anyway I can avoid having to redo this every time I branch

  • Are the referenced items part of the branch?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Phil, not sure I understand the question. When I branch and then open the branched solution the reference are there, however they are invalid. It's almost like these reference are just pointers to dacpacs

  • Paul Sims-405749 (6/11/2015)


    Phil, not sure I understand the question. When I branch and then open the branched solution the reference are there, however they are invalid. It's almost like these reference are just pointers to dacpacs

    The references are pointers to dacpacs.

    Open up your .sqlproj file and you'll find an 'ArtifactReference' group for each referenced database.

    For example:

    <ArtifactReference Include="$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\110\SqlSchemas\master.dacpac">

    <HintPath>$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\110\SqlSchemas\master.dacpac</HintPath>

    <SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>

    <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>

    </ArtifactReference>

    I have no idea where 'DacPacRootPath' comes from, however.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 4 posts - 1 through 3 (of 3 total)

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