Share via


CodeAnalysisRuleSettings.ConvertToSettingsString Method

Definition

Converts the rule configuration info in this CodeAnalysisRuleSettings object into a settings string like the one used inside SSDT project files. This string defines what rules should be disabled or have their problems treated as errors instead of warnings. Any rule not included in the settings string will be enabled by default.

public string ConvertToSettingsString ();
member this.ConvertToSettingsString : unit -> string
Public Function ConvertToSettingsString () As String

Returns

A semicolon delimited string identifying rules to be disabled or have problems treated as errors. The format is "-My.Disabled.Rule;+!My.Enabled.RuleWithError;-!My.Disabled.RuleWithError". Hence disabled rules have "-" before their ID and enabled rules with errors have "+!" before their ID. Only rules that are to be disabled or have their problems treated as errors should be included in the settings string.

Applies to