Visual Studio 2013 - Attempting to build a Database Project.
Build Error with a SQL view due to it not recognising a Synonym.
When I right click the database project and build my Database I get the following error:
D:\Users\Dave\Documents\Visual Studio 2013\Projects\DataSync\UAT_DB1\UAT_DB1\dbo\Views\uvw_FirstFix.sql(12,7): Error: SQL71501: View: [dbo].[uvw_FirstFix] has an unresolved reference to object [dbo].[Synonym_X].
Now the view [dbo].[uvw_FirstFix] has a reference to the Synonym, [Synonym_X] which references a table in a different database. I have added it the second database into the Visual Studio project and added a database reference to it.
The problem seems to be Visual Studio not being able to recognise the synonym as a synonym.
Has anyone come across this problem and how to resolve it please ?