Where can I get the master.dacpac file for SQL Server 2012?
You should be able to add a Database Reference. Click Project-> Add Database Reference. Click the radio button for System and then master. Code with references to objects in the master db should now build correctly.