DotNetMSBuildSettingsExtensions.

SetWarningCodeAsError(DotNetMSBuildSettings, string) Method

Summary

Sets the warning code to treats as an error.

Syntax

public static DotNetMSBuildSettings SetWarningCodeAsError(this DotNetMSBuildSettings settings, string warningCode)

Remarks

When a warning is treated as an error the target will continue to execute as if it was a warning but the overall build will fail.

Parameters

Name Type Description
settings DotNetMSBuildSettings The settings.
warningCode string The warning code to treat as an error.

Return Value

Type Description
DotNetMSBuildSettings The same DotNetMSBuildSettings instance so that multiple calls can be chained.