Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL71501:has an unresolved reference to Schema [win]

I am getting a unresolved reference in a SQLProject, the error occurs on the create line. All objects are causing it because they are all being created in a specific schema. For example I have Table that is being created in a specific schema"win" Create Table [win].[DataSource]. The error occurs because of the attempt to create it in the "win" schema If I remove the schema from the create statement the error goes away. The database project is a composite project including all of the artifacts (stored procs, tables, views...) from the win schema. Here is an example of the error I am seeing.

Severity Code Description Project File Line Suppression State Error SQL71501: Procedure: [win].[SelectCandidateExamSearch] has an unresolved reference to Schema [win].

like image 772
Noel Avatar asked May 08 '26 02:05

Noel


1 Answers

Create script with Build Action: build with the following SQL statement:

CREATE SCHEMA [win]

where [win] is the schema name.

For any database project in VS to build sucessfully, ALL its references must exist in the scope of the project and be valid.

like image 76
otri Avatar answered May 10 '26 23:05

otri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!