locked
Database References Don't Appear In Project Properties

    質問

  • In Visual Studio 2010 Premium, I have a solution containing several database projects.  I've noticed in at least one project the database references do not appear on the References tab in the project properties window.  I do see the references in Solution Explorer and in the Database.sqlcmdvars file.

    What might be the cause?


    Orlanzo

    2012年3月2日 15:52

回答

  • Hello Orlanzo,

    As you can't find the reference informaion in the .dbproj file, I think that acutally there is no database references in the HRD_ODS database project.

    Please imagin the following scenario: at first you add database reference successfully in the HRD_ODS database project, and you define one database variable named $(DBproj1). The $(DBproj1) variable will be added to the Database.sqlcmdvars file automatically. And at this time, you remove that database reference, you still get $(DBproj1) variable in the Database.sqlcmdvars file. That is, the $(DBproj1) variable will not be removed from Database.sqlcmdvars file.

    I personally think that there maybe some cache or some VS settings on your local machine which causes that issue. I noticed that you have put that database projects into TFS version control, please try get the latest version from TFS server, and then open it again on your local machine. In addition, will you still get the same issue on another machine?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    2012年3月6日 5:46

すべての返信

  • Hello Orlanzo,

    Are you able to build or deploy your database projects successfully? And what about your other team members? Will they get the same issue as you? And in my opinion, if you have added database references succssfully, you should not get the issue you mentioned above.

    In addition, please temporarily upload the HRD_ODS database project, and then right-click it and choose Edit HRD_ODS.dbproj file. In the HRD_ODS.dbproj file, are you able to find the <ProjectReference Include=""> </ProjectReference> nodes in the <ItemGroup> note?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    2012年3月5日 7:58
  • Hello Vicky,

    The referenced did not appear in the dbproj file.  They only existed in the sqlcmdvars files.  Ultimately, I had to delete the references from Solution Explorer and add them again.


    Orlanzo

    2012年3月5日 17:07
  • Hello Orlanzo,

    As you can't find the reference informaion in the .dbproj file, I think that acutally there is no database references in the HRD_ODS database project.

    Please imagin the following scenario: at first you add database reference successfully in the HRD_ODS database project, and you define one database variable named $(DBproj1). The $(DBproj1) variable will be added to the Database.sqlcmdvars file automatically. And at this time, you remove that database reference, you still get $(DBproj1) variable in the Database.sqlcmdvars file. That is, the $(DBproj1) variable will not be removed from Database.sqlcmdvars file.

    I personally think that there maybe some cache or some VS settings on your local machine which causes that issue. I noticed that you have put that database projects into TFS version control, please try get the latest version from TFS server, and then open it again on your local machine. In addition, will you still get the same issue on another machine?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    2012年3月6日 5:46