MSBuildSettingsExtensions.

WithWarningsAsError(MSBuildSettings, string[]) Method

Summary

Treat warnings as errors, if no codes specified all errors will be treated as errors.

Syntax

public static MSBuildSettings WithWarningsAsError(this MSBuildSettings settings, params string[] codes)

Parameters

Name Type Description
settings MSBuildSettings The settings.
codes string[] Only treat specified warning codes as errors.

Return Value

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