none
Can't get database references to work RRS feed

  • Question

  • We've been using SSDT Juneau for a few months now and are now trying to set up database references between projects in a solution.  Unfortunately, no matter what I do, I get unresolved reference errors on every single reference I try to make.  Here's an example, a SSDT project "OncallDocuments" which references "oncallUsers":

    Error 40 SQL71501: Computed Column: [dbo].[smart_filer_users].[id] has an unresolved reference to object [oncallUsers].[dbo].[user].[id]. C:\Oncall\Projects\MPMS\OncallDocuments\Schema Objects\Schemas\dbo\Views\smart_filer_users.sql 
    
    The SQL is pretty simple:
    CREATE VIEW [dbo].[smart_filer_users]
    	AS SELECT
    		id,
    [...]
    	FROM oncallUsers.[dbo].[user]
    

    Here's the project reference:

        <ProjectReference Include="..\oncallUsersPartial\oncallUsersPartial.sqlproj">
          <Name>oncallUsersPartial</Name>
          <Project>{a318c88c-fb8a-40ef-8e5b-929c6660c750}</Project>
          <Private>True</Private>
          <DatabaseVariableLiteralValue>oncallUsers</DatabaseVariableLiteralValue>
        </ProjectReference>
    
    

    I have also tried with the [$(...)] variable syntax, but nothing different happens.  The only suggestion I found was the option to disable extended T-SQL verification, but I tried disabling it on both the individual SQL file and the project with no luck.  The SQL works fine against both the LocalDB instance and the SQL Server 2008 R2 instance I'm deploying to.

    It seems other people are getting this to work - any idea what I'm missing?

    Thanks,

    Nicholas

    Wednesday, November 16, 2011 9:12 PM

Answers