VS2010 Build Warnings when building database projects referencing [sys] schema

  • I have a proc which uses a technique, which will be familiar to many here, to generate a framework for a lot of rows:

    SELECT ...

    FROM sys.all_columns ac1

    CROSS JOIN sys.all_columns ac2

    The proc is fast & works how I want. I do not actually use any of the columns in sys.all_columns.

    However, when I build the database project, I get warnings like this:

    Warning: SQL71502: Procedure: [schema].[proc name] has an unresolved reference to object [sys].[all_columns]

    Which is understandable - objects in the sys schema are not part of my database project.

    Which brings me to my question: is there a way to remove this warning without disabling all SQL71502 warnings?


  • I found the answer - just add [master] as a database reference in the database project and the warnings go away.


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

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