This problem also affects VS 2013. I found that manually entering the relative path to the rule assembly and the rules from this assembly will cause these rules to appear when opening the ruleset using the Visual Studio rule designer user interface. Rules will also be launched.
Thus, the operating room of CustomRules.ruleset might look like where SR1000 is the rule from SomeRules.dll and SOR1000 from SomeOtherRules.dll. Please note that the version for tools is 12.0 for Visual Studio 2013.
<?xml version="1.0" encoding="utf-8"?> <RuleSet Name="Sample" Description="Sample ruleset" ToolsVersion="12.0"> <RuleHintPaths> <Path>..\Tools\FxCop\SomeRules.dll</Path> <Path>..\Tools\FxCop\SomeOtherRules.dll</Path> </RuleHintPaths> <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed"> <Rule Id="SR1000" Action="Error" /> <Rule Id="SOR1000" Action="Warning" /> </Rules> </RuleSet>
Note that you can easily incorporate standard Microsoft rules by adding values such as RuleSet :
<Include Path="minimumrecommendedrules.ruleset" Action="Default" />
source share