Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Database Project Build Error

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 ?

like image 870
James Khan Avatar asked May 15 '26 23:05

James Khan


1 Answers

Please review and correct your VIEW in Database View: [dbo].[uvw_FirstFix].

There's a reference to it and compiler is unable to find it.

like image 155
Peter Avatar answered May 18 '26 14:05

Peter