Referencing system views in SSDT?

This should be handled by adding a reference to the master database.

Add database reference dialog

Previously, we've had issues related to the relative path that's used to reference the master.dacpac (as described here). If I remember correctly, we pulled a copy of the master.dacpac file into the local project and referenced it using the last option shown in the dialog above. This is not ideal however as you'll need to remember to update your copy of the reference periodically.

Will update if I can find the details of what was causing a problem with the referencing method.


References to sys.tables or similar can be resolved by just referencing master system db as visible in the picture of Mark`s answer.

In case you want to go the other way and use a dacpac to reference the system dbs, you can find it like so:

enter image description here