System Database References in Visual Studio
Just a quick post for something I always forget with SQL Server Database projects in Visual Studio.
If any of the objects in the project refer to system views then building the project results in errors along the line of
SQL71501: View: [etl].[GetColumnTypeDifferences] has an unresolved reference to object [sys].[types]
The fix is to add a Database Reference in Visual Studio to the relevant system databases, usually just master but could also be msdb depending on what's being referenced. Right click References and choose Add Database Reference, select the required system database then click OK. Generally the other defaults won't need to be changed
No comments:
Post a Comment