Reputation: 4036
In VS2008 Team System how do I select some Code Analysis rules? The window is empty.
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?
Upvotes: 1
Views: 354
Reputation: 4036
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.
Upvotes: 2