WCF Security Code Analysis isn't working

Jan 23, 2008 at 11:46 PM
When I try to run the security code analysis recipe I get the following error:

(*) Error: 0 : Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CodeAnalysisSecurityRulesByProject. Error was: Action CodeAnalysisRulesByProjectAction failed to execute:
Command "ClassViewContextMenus.ClassViewProject.RunCodeAnalysisonSelection" is not available..

I also tried loading the rules assembly into fxcop (1.35) and they won't load. Stack trace:

at Microsoft.FxCop.Common.EngineManager.StandardLoadRules(RuleFile ruleFile)
at Microsoft.FxCop.Common.EngineManager.LoadRules(RuleFile ruleFile)
at Microsoft.FxCop.Common.RuleFile..ctor(String fileName, RuleFileDictionary container)
at Microsoft.FxCop.UI.RuleControl.Add(String[] fileNames)

Keyword: CA0053

Thanks in advance.
Jan 24, 2008 at 1:51 PM
On which kind of project and language are you trying to run this option ?
BTW, the rules won'r run from fxcop tool since it use another version of the engine API so they will only run from VS IDE.
Feb 11, 2008 at 11:44 PM
Closing the loop on this one...on another thread I learned that the semantic library wasn't supported in my edition of visual studio, and so I followed a similar approach on that library as well as security. I pulled down the source for the security analysis and changed the project to use fxcop 1.35. I was then able to execute the rules against my code via the fxcop UI.