Summary
Sets the warning code to treats as an error.
- Namespace
- Cake
.Common .Tools .DotNet .MSBuild - Containing Type
- Dot
Net M S Build Settings Extensions
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 | Dot |
The settings. |
warningCode | string | The warning code to treat as an error. |
Return Value
Type | Description |
---|---|
Dot |
The same DotNetMSBuildSettings instance so that multiple calls can be chained. |