3

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 ?

2
  • 1
    Do you already see this? stackoverflow.com/questions/18096029/… Commented Oct 11, 2018 at 6:12
  • Is the synonym defined in the database project? Besides, why Visual Studio 2013? SSDT is a separate download now which can be installed separately. A lot of bugs have been fixed since 2013 Commented Oct 12, 2018 at 10:06

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.