I have recently started using Visual Studio 2008 for Database Professionals. We work in an environment with may queries running across databases on the same server and have one set of databases per country. Therefore I use synonyms to keep the code constant and ease the deployment task.
However, if a use synonyms in a View, I am hit with a multitude of Build Errors in VS. These are of the form:
Error227TSD03006: View: [dbo].[vw_AddressProfile] has an unresolved reference to object [dbo].[TransactionHistory].C:\[Database Project Name]\Schema Objects\Views\dbo.vw_AddressProfile.view.sql
In the above case vw_AddressProfile is the View I am creating and dbo.TransactionHistory is a synonym which references a table in another database. The View works a treat if scripted directly in SSMS - the problem is purely with Visual Studio.
I found one source which suggested turning off the "Enable Extended Transact-SQL Verification" option on the Build tab. However that option is not present when I look.
Any ideas on how to solve this?
MCSA SQL Server 2012