views:

9

answers:

1

In VS2008 Team System how do I select some Code Analysis rules? The window is empty.

alt text

When I build, there is the error:

CA0053 : * Failed to load rules file '\rules': Unable to find the specified file.

Obviously this means the rules file isn't found and that is the problem. What is the remedy? In other words, how do I use the project page properties to create a rules file?

+1  A: 

Figured it out. The path to the code analysis rules are in the project file. If you open the project file in Notepad, you can manually edit it to set the path. This would most likely be relevant with an old project, as fresh projects would already have the correct default path.

For example, in my case I added the full path in the project xml file: C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Static Analysis Tools\FxCop\Rules

Then the rules page was populated with choices to select from.

Adam Kane