DotNetCoreMSBuildSettingsExtensions.

SetWarningCodeAsError(DotNetCoreMSBuildSettings, string) Method

Summary

Sets the warning code to treats as an error.

Syntax

public static DotNetCoreMSBuildSettings SetWarningCodeAsError(this DotNetCoreMSBuildSettings 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 DotNetCoreMSBuildSettings The settings.
warningCode string The warning code to treat as an error.

Return Value

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