locked
Suppress errors caused by unresolved references?! RRS feed

  • Question

  • Hello!

    I use the option "Suppress error caused by unresolved references" for:

    You may choose to suppress errors if there are unresolved references in the project. This is useful if your dacpac file could be out of date. You can still code against an object you know to exist, but isn't in the reference file yet.

    For my test I build an empty dacpac file ("EmptyDACPAC.dacpac") - there is no view, table in this file.
    In an another project I have a database reference to this dacpac.
    Although I used this option, I get also the "unresolved references error" for a Select-Stmt to this DACPAC  - the table is of course not in the dacpac.

    How can I prevent this? Thx in advance.

    Tuesday, August 27, 2013 6:31 AM

Answers

  • Hi Ferdl,

    You get the error because Schema1.Table1 is not in EmptyDACPAC dacpac. Before referencing an object in referenced project, you should make sure that that object exists.

    The option "Suppress error caused by unresolved references in the referenced project" means that the error will be suppressed if your referenced project has an unresolved reference error. For example Proj A -> Proj B -> other projects. If Proj B has an unresolved references and you select that option, you will be able to build proj A successfully.   

    Hope that help :)


    Apisada Petchtes


    • Edited by Apisada Petchtes Saturday, September 7, 2013 12:08 AM
    • Proposed as answer by Apisada Petchtes Saturday, September 7, 2013 12:08 AM
    • Marked as answer by Ferdl Monday, September 9, 2013 4:31 AM
    Saturday, September 7, 2013 12:08 AM

All replies

  • Hi Ferdl,

    You get the error because Schema1.Table1 is not in EmptyDACPAC dacpac. Before referencing an object in referenced project, you should make sure that that object exists.

    The option "Suppress error caused by unresolved references in the referenced project" means that the error will be suppressed if your referenced project has an unresolved reference error. For example Proj A -> Proj B -> other projects. If Proj B has an unresolved references and you select that option, you will be able to build proj A successfully.   

    Hope that help :)


    Apisada Petchtes


    • Edited by Apisada Petchtes Saturday, September 7, 2013 12:08 AM
    • Proposed as answer by Apisada Petchtes Saturday, September 7, 2013 12:08 AM
    • Marked as answer by Ferdl Monday, September 9, 2013 4:31 AM
    Saturday, September 7, 2013 12:08 AM
  • Your create statement should look like this:

    CREATE VIEW [dbo].[RefenrenceView] AS
         SELECT [$(EmptyDACPAC)].[Schema1].[Table1]

    annoying issue with that is when you do a schema compare from DB to solution, it wants to overwrite it with the filled-in variable name.

    Wednesday, March 4, 2020 6:09 PM