VS 2012 Database Project “unresolved reference to object” Error

后端 未结 9 1256
再見小時候
再見小時候 2020-12-16 09:02

I created SQL Server Database Project in VS 2012 & imported our database. When I build the project, I get a lot of \"unresolved reference to object\" Errors. These error

相关标签:
9条回答
  • 2020-12-16 09:55

    One other possibility is that the schema you have used in your view/table etc does not exist in the project. You may need to add the schema to the VS Database Project.

    Right Click the project and Add > New Item > Schema

    0 讨论(0)
  • 2020-12-16 10:01

    This happened to me when building a CTE in Visual Studio 2015. I changed the Build Action to Compile and the errors went away.

    1. Select the file(s) with the error
    2. Press F4 to see the properties.
    3. Select 'Compile' in the Build Action drop down list.

    Hope this helps someone.

    0 讨论(0)
  • 2020-12-16 10:02

    I solved this issue.

    It seems a few of my views/SPs have referenced the tables using this naming convention ( 3 parts qualified name ):

    DatabaseName.SchemaName.TableName

    I changed all references to be as the following:

    SchemaName.TableName

    0 讨论(0)
提交回复
热议问题