I have created a brand new database project in VS 2017. I have set the target platform to SQL Server 2016 and have added master and msdb as references.
The issue I am having is that I have a view that references sys.availability_groups and filters on the column is_distributed. It is throwing this error:
SQL71561: View: [dbo].[VUHL_vw_AGInfo] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [master].[sys].[availability_groups].[AG]::[is_distributed], [master].[sys].[availability_groups].[is_distributed], [master].[sys].[availability_replicas].[AG]::[is_distributed], [master].[sys].[dm_hadr_availability_group_states].[AG]::[is_distributed], [master].[sys].[dm_hadr_availability_replica_states].[AG]::[is_distributed] or [master].[sys].[dm_hadr_database_replica_states].[AG]::[is_distributed].
I know the column exists, and I know that it didn't used to exist prior to 2016 and I asked this question. However, even with that workaround it won't recognize the column.
Is there a way to get the database project to recognize the column, or to tell it not to care?