<warnaserror>

Controls the behaviour of a compiler with regards to the reporting of warnings.

Parameters

Attribute Type Description Required
id string The ID used to be referenced later. False
refid string The ID to use as the reference. False

Nested Elements:

<include>

Specifies a list of warnings that the compiler should treat as errors. This overrides the warnaserror attribute. Only supported when targeting .NET 2.0 or higher.

Represents a compiler warning.

Parameters

AttributeTypeDescriptionRequired
numberstring A warning number, or comma-separated list of warnings, that you want the compiler to suppress or report. True
ifbool If true then the element will be processed; otherwise, skipped. The default is true. False
unlessbool If true then the element will be skipped; otherwise, processed. The default is false. False

</include>

<exclude>

Specifies a list of warnings that the compiler should NOT treat as errors. This is only useful if warnaserror is true. Only supported when targeting .NET 2.0 or higher.

Represents a compiler warning.

Parameters

AttributeTypeDescriptionRequired
numberstring A warning number, or comma-separated list of warnings, that you want the compiler to suppress or report. True
ifbool If true then the element will be processed; otherwise, skipped. The default is true. False
unlessbool If true then the element will be skipped; otherwise, processed. The default is false. False

</exclude>

Examples

Requirements

Assembly: NAnt.DotNetTasks (0.90.3780.0)