locked
VS 2012 Database Project - Suppress Warning Messages Option for Error Codes Does not work?

    Question

  • Hi All,

    I have created a VS 2012 Database Project and as an example i have a view which

    makes a call to an external Database and would like to be able to do a Build without having

    to declare a reference to the External Database.

    Is it possible to do this?

    I get the impression that its not, as even when you use the Suppress Warning Messages options either

    at the build Level or File Level for the error code i am getting at the build event it looks like

    the Database project needs for there to be a reference somewhere for it to be able to build.

    I have tried adding the in the Error Codes to suppress the error messages but it looks like it just

    does not work.

    Any Advice\Feedback appreciated.

    Kind regards,

    MMck

    Friday, March 22, 2013 3:08 AM

Answers

  • Hello,

    Thank you for your post.

    “the Database project needs for there to be a reference somewhere for it to be able to build.”

    I would like to know if this is an error or warnings. As far as I know, if it is an error, using Suppress Warning Messages to suppress the error will be not useful because it is not a warning.

    As far as I know the “Suppress Static Code Analysis Messages” option can suppress these warnings that have enabled specific rules for static analysis of database cube. If it is a warning, please right click it and check if there is ‘Suppress Static Code Analysis Messages’ option. If yes, you can try to click it to suppress this warning.

    In addition, you said that you still get the issue even though you use the Suppress Warning Messages . Please make sure that you use the Suppress Warning Messages options through  in the text box entering a comma separated list of the warning numbers that you do not want to be shown (without prefix "TSD", just the numbers).

    Based on your issue, I did a research and find a thread with similar issues:

    http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/648c30d5-375a-4bb9-b5ff-ddd986788808

    You can try to disable the ‘Enable Code Analysis on Build’ option and set the Build Action to None to check if it can help you.

    If still no help, as I know the warning messages sometimes may be indicating a 'real' problem and we need to change the code. Based on GorancoB’s explanation, I am afraid that you have to reference the external database in order to make the build succeed.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by killerchef Monday, March 25, 2013 3:21 AM
    Monday, March 25, 2013 2:40 AM
    Moderator

All replies

  • Hello,

    Thank you for your post.

    “the Database project needs for there to be a reference somewhere for it to be able to build.”

    I would like to know if this is an error or warnings. As far as I know, if it is an error, using Suppress Warning Messages to suppress the error will be not useful because it is not a warning.

    As far as I know the “Suppress Static Code Analysis Messages” option can suppress these warnings that have enabled specific rules for static analysis of database cube. If it is a warning, please right click it and check if there is ‘Suppress Static Code Analysis Messages’ option. If yes, you can try to click it to suppress this warning.

    In addition, you said that you still get the issue even though you use the Suppress Warning Messages . Please make sure that you use the Suppress Warning Messages options through  in the text box entering a comma separated list of the warning numbers that you do not want to be shown (without prefix "TSD", just the numbers).

    Based on your issue, I did a research and find a thread with similar issues:

    http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/648c30d5-375a-4bb9-b5ff-ddd986788808

    You can try to disable the ‘Enable Code Analysis on Build’ option and set the Build Action to None to check if it can help you.

    If still no help, as I know the warning messages sometimes may be indicating a 'real' problem and we need to change the code. Based on GorancoB’s explanation, I am afraid that you have to reference the external database in order to make the build succeed.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by killerchef Monday, March 25, 2013 3:21 AM
    Monday, March 25, 2013 2:40 AM
    Moderator
  • Hi Amanda,

    "I would like to know if this is an error or warnings. As far as I know, if it is an error, using Suppress Warning Messages to suppress the error will be not useful because it is not a warning."

    Good point, I was getting Errors and not warning messages so yes perhaps I am not able to supress the Errors.

    The thread http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/648c30d5-375a-4bb9-b5ff-ddd986788808 helps

    to explain things and it looks like I am forced to declare all External Database references in order to get a project Build.

    Circular dependancy code I will just have to be updated as well for the Database project.

    Thanks so much for your help and have yourself a good one.

    Kind regards,

    MMck

    Monday, March 25, 2013 4:02 AM