Hi all,
I have an FxCop project with certain active, excluded and absent messages but while I save the report, the excluded and absent messages are not saved in the XML. Only active message are saved. The option in project default for excluded and absent messages are checked still the report doesnot contain excluded and active messages.
I want all the messages in the report. Please anybody help me in solving the problem.Thanks in advance.

XML report does not show excluded and absent messages.
markusb9
Hi David,
I had tried it on FxCop 1.35 i am Facing the same problem.
Regards,
Phani
hemo
Thanks David and Phani,
I am also able to view in other than internet explorer.
Thanks once again...
Pawnder
Phani,
Can you send me a small repro (ie project and target assembly) to my email address in my profile
Regards
David
djklocek
JGttttt
Although the Project default's show that excluded and absent messages are checked, can you check the actual Project's option (Project -> Options)
Regards
David
Paul Devine
Yes all the 6 checkboxes( 2 for active, 2 for excluded and 2 for absent) are checked only.
I save the report by file -> Save Report as.
I tried using a new project, still i have the same problem in the report generated.
Captain Baz
When you checked the Project -> Options, did you make sure that both Project and Report Excluded and Absent checkboxes are checked (ie 4 in total)
How are you saving the report (ie File -> Save Report As)
Can you try using a new project to see if that makes a difference (make sure you check the Project -> Options)
solnt
I can't reproduce this on FxCop 1.35.
Phani: Can you check that you have the set the Report to save both Excluded and Absent messages in the Project options as indicated above
renju: Although FxCop 1.35 requires .NET 2.0 to be installed to run, it supports analyzing both .NET 1.x and .NET 2.0 binaries.
Alex Poon
Phani,
Thanks for sending the project and files, but I still am not able to reproduce this, this is the output report that I saved (I've bolded the absent and excluded violations):
< xml version="1.0" encoding="utf-8" >
< xml-stylesheet type="text/xsl" href="http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl" >
<FxCopReport Version="1.35">
<Targets>
<Target Name="$(ProjectDir)/ClassLibrary1.dll">
<Modules>
<Module Name="classlibrary1.dll">
<Namespaces>
<Namespace Name="Morris.MorrisExpress.Calculator.UI">
<Types>
<Type Name="classPost" Kind="Class" Accessibility="Public" ExternallyVisible="True">
<Members>
<Member Name="CamelCase" Kind="Property" Static="False" Accessibility="Private" ExternallyVisible="False">
<Messages>
<Message Id="CamelCase" TypeName="MemberVariables" Category="Microsoft.Naming" CheckId="MC0010" Status="Active" Created="2006-06-06 18:01:12Z" FixCategory="NonBreaking">
<Issue Certainty="100" Level="Warning">Alter the name 'CamelCase' to Camel Case.</Issue>
</Message>
</Messages>
</Member>
<Member Name="morrisNumber" Kind="Field" Static="False" Accessibility="Family" ExternallyVisible="True">
<Messages>
<Message TypeName="Abbrevations" Category="Microsoft.Naming" CheckId="MC0001" Status="Excluded" Created="2006-06-06 18:01:12Z" FixCategory="NonBreaking">
<Issue Certainty="100" Level="Warning">Alter the name 'morrisNumber', remove abbreviations.</Issue>
</Message>
</Messages>
</Member>
<Member Name="pascalCase" Kind="Field" Static="False" Accessibility="Public" ExternallyVisible="True">
<Messages>
<Message TypeName="Abbrevations" Category="Microsoft.Naming" CheckId="MC0001" Status="Active" Created="2006-06-06 18:01:12Z" FixCategory="NonBreaking">
<Issue Certainty="100" Level="Warning">Alter the name 'pascalCase', remove abbreviations.</Issue>
</Message>
<Message Id="pascalCase" TypeName="MemberVariables" Category="Microsoft.Naming" CheckId="MC0010" Status="Active" Created="2006-06-06 18:01:12Z" FixCategory="NonBreaking">
<Issue Certainty="100" Level="Warning">Alter the name 'pascalCase' to Pascal Case.</Issue>
</Message>
</Messages>
</Member>
<Member Name="PascalCase" Kind="Field" Static="False" Accessibility="Public" ExternallyVisible="True">
<Messages>
<Message TypeName="Abbrevations" Category="Microsoft.Naming" CheckId="MC0001" Status="Absent" Created="2006-06-06 18:01:12Z" FixCategory="NonBreaking">
<Issue Certainty="100" Level="Warning">Alter the name 'PascalCase', remove abbreviations.</Issue>
</Message>
</Messages>
</Member>
</Members>
</Type>
</Types>
</Namespace>
</Namespaces>
</Module>
</Modules>
</Target>
</Targets>
<Rules>
<Rule TypeName="Abbrevations" Category="Microsoft.Naming" CheckId="MC0001">
<Name>Abbreviations Usage</Name>
<Description>Abbreviations should be avoided unless it’s a well known abbreviation.</Description>
<Resolution Name="Default">Alter the name '{0}', remove abbreviations.</Resolution>
<Owner>P Phani Sankar Pogaru</Owner>
<Url>http://localhost/</Url>
<Email>ppogaru@rapidigm.com</Email>
<MessageLevel Certainty="100">Warning</MessageLevel>
<File Name="MorrisNamingConventions.dll" Version="1.0.0.0" />
</Rule>
<Rule TypeName="MemberVariables" Category="Microsoft.Naming" CheckId="MC0010">
<Name>Member Variable Naming</Name>
<Description>Member variables follow the Camel Case notation. Do not prefix member variables with a '_'</Description>
<Resolution Name="Default">Alter the name {0}</Resolution>
<Owner>P Phani Sankar Pogaru</Owner>
<Url>http://localhost/</Url>
<Email>ppogaru@rapidigm.com</Email>
<MessageLevel Certainty="100">Warning</MessageLevel>
<File Name="MorrisNamingConventions.dll" Version="1.0.0.0" />
</Rule>
</Rules>
<Localized>
<String Key="Category">Category</String>
<String Key="CollapseAll">Collapse All</String>
<String Key="CheckId">Check Id</String>
<String Key="Error">Error</String>
<String Key="Errors">error(s)</String>
<String Key="Line">Line</String>
<String Key="LocationNotStoredInPdb"><Location not stored in Pdb></String>
<String Key="Project">Project</String>
<String Key="Rule">Rule</String>
<String Key="RuleDescription">Rule Description</String>
<String Key="Source">Source</String>
<String Key="Target">Target</String>
<String Key="Warning">Warning</String>
<String Key="Warnings">warning(s)</String>
<String Key="ReportTitle">Code Analysis Report</String>
</Localized>
</FxCopReport>
How are you determining that the absent and excluded violations are not being output These are not displayed if you view them in Internet Explorer (this is by-design).
Can you post the exact steps (from running the analysis, to saving the report) you are using to reproduce the problem
Regards
David
swatiabhyankar
im using version 1.32, version 1.35 is for .net2.0.
im having .net1.1,
RichardSa
Hi David,
Yes i had checked all the six boxes and tried creating a new project.i am unable to achive,In Fxcop it is showing but in report it is giving only Active messages.
Regards,
Phani
peter.keyjob
David -
You state that "...absent and excluded violations ... are not displayed if you view them in Internet Explorer (this is by-design)." My group had a desire to have a report that would show all excluded violations so we could review them at our code reviews. It's not enough for the report to just show active messages - simplest thing for a developer to fix an active message is not to fix the code but to exclude it from the project. Also wanted to make sure we could discuss appropriate exclusions, see which ones made sense and which ones should not be excluded.
I've just uploaded FxCopReportAll.xsl that shows all messages (Active, Excluded, ExcludedInProject) if anyone's interested in seeing it. Users will need to make sure that project options will include Excluded messages in the report, then can change project options to use this file for the style sheet (default is http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl, change to C:\Program Files\Microsoft FxCop 1.35\Xml\FxCopReportAll.xsl or wherever you've installed this file).
Michael
allison_h
Hi David,
I got it,I am viewing the report from InternetExplorer and unable to see the excluded and absent messages.Now i am able to view them.Thank you.
Regards,
Phani
spolsky
What version are you running If you are not running the latest (1.35 RC1) can you download that and see if that makes a difference
http://www.gotdotnet.com/team/fxcop/