My database projects in Visual Studio have recently starting throwing these unresolved reference errors every time any create table
file in the project is touched.
SQL71501: Column: ___ has an unresolved reference to Built-in Type [int].
SQL71501: Column: ___ has an unresolved reference to Built-in Type [datetime].
SQL71501: Column: ___ has an unresolved reference to Built-in Type [varchar].
If I rebuild the project, everything builds with no errors, and the errors flagged by Visual Studio disappear. However, as soon as I edit any file (even as little as adding a space to the end of a file), that file will immediately become plagued with these unresolved reference errors... until I rebuild again. However, as it's a fairly large project, I don't want to spend about a minute rebuilding after every single minor edit.
This project is worked on by several other people, who do not encounter this issue. How can I resolve this?
Update: If I change tabs, the errors for the first tab disappear until I go back to it. I've also disabled all extensions, but the problem still occurs.
Close down Visual Studio, navigate to the project folder and find the .dbmdl
file. Delete it. Reopen the project and rebuild it. This should solve the problem.
In my case the solution was to change the target of my SSDT project to a more recent version of SQL Server (right click on the projet/Properties/Project Settings/Target platform).
See: https://www.codeproject.com/Articles/565459/FixingplusSSDTplusunresolvedplusreferenceplustoplu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With