[BUG: 1.32RTM] Error when opening file with 'Save Rules By' set to 'Message Level'

Guys,

I came across this when I tried to open a file that I had saved in a pre-release version of 1.32 and tried to open it in the RTM of 1.32. The funny thing is that I don't ever remember changing the 'Save Rules By' option.

FxCop displays the following error when opening a file that has 'Save Rules By' changed to 'Message Level'.

An error occurred while loading '[FileName]'.

'Value cannot be null.
 Parameter name: defaultCategory'

Stack Trace:
at Microsoft.FxCop.Common.NamedRuleTable.Load(XmlNode node, NamedRuleTable defaultCategory, Boolean isDefinition, Boolean isSelectedAndInNewProject, Boolean isSystem, String groupName, Hashtable usedRules)at Microsoft.FxCop.Common.CategorizedRuleTable.Load(XmlNode node, Boolean isDefinition, Boolean isSystem)at Microsoft.FxCop.Common.GroupedRuleTable.Load(XmlNode node, Boolean isSystem)

To reproduce:

1. Start FxCop 1.32 RTM (Build: 50628)
2. Start a new project, by choosing File -> New Project
3. Choose Project -> Options...
4. In Project Options, choose the Saving & Compression tab
5. Under Project File group box, change Save Rules By to Message Level
6. Click OK
7. Save the Project by choose File -> Save Project As.., enter a file name and click Save
8. Choose File -> Open Project.. and select the project that was just saved and click Open

A message box displays with the above error.

This above error occurs whether the project has targets or not and whether the project has active violations or not.

Just another thing, the copyright symbol in the Help -> About Microsoft FxCop is being displayed as a question mark.

Cheers

David




Answer this question

[BUG: 1.32RTM] Error when opening file with 'Save Rules By' set to 'Message Level'

  • Utku

    Unfortunately this issue slipped through the cracks and was not fixed in time for the 1.35 beta release. We will get this fixed before the next update to FxCop.

    Thanks!

    Nick


  • Carlitos

    Hm, I'll have someone take a look at this. I thought I fixed an issue around this a while back but it's possible that fix did not get ported to the 1.32 branch. I'm guessing you're using the last posted build of 1.32 from www.gotdotnet.com.

    More soon, and thanks as always for the problem report, David,

    Michael

  • Kendallsoft

    Definitely a bug in both our working branch and 1.32. We will fix both versions asap.

    Thanks again,
    Michael



  • Madhu K Nair

    Hi!

    Was this issue ever resolved I am experiencing the same problem using the repro steps.

    I'm using FxCop 1.35 (build 51212.0) on .net 2.0.50727.42.

    Thanks!

    Ben Tsai


  • amat2to0

    This fix will appear in the next release of FxCop 1.35.

  • [BUG: 1.32RTM] Error when opening file with 'Save Rules By' set to 'Message Level'