Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress Database Project errors and warnings in visual studio 2010

I have an Database project in my application and want to suppress the errors/warnings thrown by this project. .first of all is it possible ?

I think I was not clear with my question, by suppressing I meant that when I build my Solution, the errors(which actually are not errors) are shown in the error list, I just want that all Database project related errors should not be shown in the error list.

I am using VS2010.

thanks in advance

like image 316
Sumit Avatar asked Apr 16 '11 07:04

Sumit


People also ask

How do you suppress Code Analysis warnings?

You can suppress violations in code using a preprocessor directive, the #pragma warning (C#) or Disable (Visual Basic) directive to suppress the warning for only a specific line of code. Or, you can use the SuppressMessage attribute.

How do I see warnings in Visual Studio?

To display the Error List, choose View > Error List, or press Ctrl+\+E.


2 Answers

To surppress a specific warning, go to project properties -> Build.

Type in the warning numbers (i.e. without 'SQL') in comma delimited format in field "Suppress Transact-SQL warnings:".

like image 73
Rushui Guan Avatar answered Oct 04 '22 02:10

Rushui Guan


Select the file in the project:

example: projectDatabase\ddl\table_name.sql

on the Properties Window of the file set

Build Action : None.

While building it doesn't look in this files for errors or warnings.

like image 28
Ricardo Figueiredo Avatar answered Oct 04 '22 02:10

Ricardo Figueiredo