Prevents the compiler from displaying code for syntax-related errors and warnings.




By default, -quiet is not in effect. When the compiler reports a syntax-related error or warning, it also outputs the line from source code. For applications that parse compiler output, it may be more convenient for the compiler to output only the text of the diagnostic.

In the following example, Module1 outputs an error that includes source code when compiled without -quiet.

Module Module1  
    Sub Main()  
    End Sub  
End Module  


C:\projects\vb2.vb(3) : error BC30451: 'x' is not declared. It may be inaccessible due to its protection level.


Compiled with -quiet, the compiler outputs only the following:

E:\test\t2.vb(3) : error BC30451: Name 'x' is not declared.


The -quiet option is not available from within the Visual Studio development environment; it is available only when compiling from the command line.


The following code compiles T2.vb and does not display code for syntax-related compiler diagnostics:

vbc -quiet t2.vb  

See Also

Visual Basic Command-Line Compiler
Sample Compilation Command Lines