It seems like when you add another database as a reference to a SQL Server Database Project, the way to reference that database in the query code is via the Database Variable Name which is the notation $(ReferencedDatabaseName):
So a query in the primary database would then reference an object from the referenced database in the following way:
SELECT Field1, Field2
FROM [$(ReferencedDatabaseName)].SchemaName.ObjectName
Is there a way to just directly reference the database by it's actual name, e.g.:
SELECT Field1, Field2
FROM ReferencedDatabaseName.SchemaName.ObjectName
If not, does that mean if I import an existing database that references objects in other databases into my solution, I need to replace all the referenced database names with this database variable name notation?