VCProject.AddRuleDefinition Method (String, String, Boolean)

 

Adds a rule to the project so that it is available as an IVCRulePropertyStorage.

Namespace:   Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

bool AddRuleDefinition(
	string bstrRuleFilePath,
	string bstrContext,
	bool bPersistInProject
)

Parameters

bstrRuleFilePath
Type: System.String

The path to a XAML file that contains a rule. May be a full path or relative to the project.

bstrContext
Type: System.String

A semicolon-delimited list of contexts in which this rule applies.

bPersistInProject
Type: System.Boolean

Specify true to add the rule to the project permanently, or false to add the rule only until it is unloaded.

Return Value

Type: System.Boolean

true if the rule was actually added to the project; false if the rule was already defined in the project.

This method adds a PropertyPageSchema item to the project file. No condition is attached to the added item.

To read the rule just added, browse through Rules for any configuration.

Return to top
Show: