Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:32:58+00:00 2026-06-18T09:32:58+00:00

I have a class like this one: [System.Diagnostics.CodeAnalysis.SuppressMessage(Microsoft.Naming, CA1709:IdentifiersShouldBeCasedCorrectly, MessageId = Io)] public void

  • 0

I have a class like this one:

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Io")]
    public void ParaQueFalleCalidadCodigoUnoIo_ReglaCA1709()
    {

    }

    public void ParaQueFalleCalidadCodigoDosIo_ReglaCA1709()
    {

    }

I use a custom Ruleset file CustomRules.ruleset

<RuleSet Name="RulesNet" ToolsVersion="10.0">
  <RuleHintPaths>
    <Path>C:\Fxcop10.0\Rules</Path>
  </RuleHintPaths>
  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">

    <Rule Id="CA1709" Action="Warning" />

  </Rules>
</RuleSet>

When I run VS2010 built in Code Analysis tool, I get this warning:

CA1709 : Microsoft.Naming : Correct the casing of ‘Io’ in member name
‘_Default.ParaQueFalleCalidadCodigoDosIo_ReglaCA1709()’ by changing it
to ‘IO’.

Now, I can use this same rule set file CustomRules.ruleset in FxCopCmd.exe:

FxCopCmd.exe /gac /d:”C:\CompanyFramework\4.0.0.0″ /f:”D:\TFS\Tests\WebApplication1\bin\WebApplication1.dll” /o:”resultsFxCop.xml” /ruleset:”=CustomRules.ruleset” /v

I get 2 errors (FixCategory Breaking, and Level Error)

CA1709 – Correct the casing of ‘Io’ in member name
‘_Default.ParaQueFalleCalidadCodigoUnoIo_ReglaCA1709()’ by changing it
to ‘IO’.

CA1709 – Correct the casing of ‘Io’ in member name
‘_Default.ParaQueFalleCalidadCodigoDosIo_ReglaCA1709()’ by changing it
to ‘IO’.

  <Message Id="Io" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Active" Created="2013-02-05 10:24:01Z" FixCategory="Breaking">
             <Issue Name="Member" Certainty="85" Level="Error" Path="D:\TFS\Tests\WebApplication1" File="Default.aspx.cs" Line="21">Correct the casing of 'Io' in member name '_Default.ParaQueFalleCalidadCodigoUnoIo_ReglaCA1709()' by changing it to 'IO'.</Issue>
  </Message>

  <Message Id="Io" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Active" Created="2013-02-05 10:24:01Z" FixCategory="Breaking">
             <Issue Name="Member" Certainty="85" Level="Error" Path="D:\TFS\Tests\WebApplication1" File="Default.aspx.cs" Line="26">Correct the casing of 'Io' in member name '_Default.ParaQueFalleCalidadCodigoDosIo_ReglaCA1709()' by changing it to 'IO'.</Issue>
  </Message>

In resultsFxcop.xml, I have seen CA1709: IdentifiersShouldBeCasedCorrectly rule:

 <Rule TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709">
   <Name>Identifiers should be cased correctly</Name>
   <Description>Type, namespace, and... OMITED.</Description>
   <Resolution Name="Member">Correct the casing of '{0}' in member name {1} by changing it to '{2}'.</Resolution>
   <Owner />
   <Url>http://msdn.microsoft.com/library/ms182240(VS.100).aspx</Url>
   <Email>[none]</Email>
   <MessageLevel Certainty="85">Error</MessageLevel>
   <File Name="namingrules.dll" Version="10.0.0.0" />
  </Rule>

MessageLevel for CA1709 rule:

   <MessageLevel Certainty="85">Error</MessageLevel>

Two issues:

  • I get Errors but CA1709 rule Action is Warning
  • SuppressMessage is ignored using FxCopcmd.exe

Now, I modify CustomRules.ruleset and I execute FxCopcmd.exe again

<Rule Id="CA1709" Action="None" />

I get NO errors.

I modify CustomRules.ruleset and I execute FxCopcmd.exe again

<Rule Id="CA1709" Action="Ignore" />

I get the same 2 errors.

I need use FxCopCmd.exe and a custom ruleset.

  • Does SuppressMessage works for FxCopcmd.exe?
  • Why do I get errors if Action is Warning, using Fxcopcmd.exe?
  • What does MessageLevel Error for CA1709 rule mean? More priority than Rule Action “Warning”?

Any suggestions?

Update

http://social.msdn.microsoft.com/Forums/en/vstscode/thread/3f8931da-9a4d-47a6-b331-8b6b07aea8d6

http://social.msdn.microsoft.com/forums/en-US/vstscode/thread/3cb6c50c-7095-4551-a4e3-a3cbc7cb85be

For the default FxCop rules, there is no easy way to modify the message level,

MessageLevel is the importance of the message, e.g. if you had thousands of messages, it probably would be a good idea to start addressing the Critical (the exclamation mark) Errors first.

Certainty is the number the Rule writer assigns to each rule, it is the likelihood that a message leads to a code change. This number is built up based on feedback from domain experts & customers and how well the heuristic used in the rule is able to avoid false positives.

Fix Category: This indicates if the fix for a violation would be a binary breaking change if the code has previously shipped. e.g you have a library with a misspelling in it that you have already shipped to customers. You now start running FxCop on it and see the misspelling. FxCop will tell you this is a breaking change. If you fix the misspelling and ship a new version of your library to customers, they can’t use the library without changing and recompiling their code. So you probably want to ignore the FxCop violation on this API. On the other hand, if you never shipped, it would be totally fine to fix the FxCop violation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:32:59+00:00Added an answer on June 18, 2026 at 9:32 am

    Does SuppressMessage works for FxCopcmd.exe?

    Yes. You will need to compile with the CODE_ANALYSIS compilation symbol defined in order for your SuppressMessage attributes to be included in your assembly. Once they’re in there, the FxCop engine will recognize them, regardless of the mechanism used to run the analysis.

    Why I get errors if Action is Warning, using Fxcopcmd.exe?

    The issue level written to the FxCop-produced report always uses the level specified by the rule author. When you run from within Visual Studio, the Visual Studio integration plug-in overrides this level with the one specified in the ruleset. When you run fxcopcmd.exe, the only difference between a configuring a rule as a warning vs an error is that detection of an error-level rule violation will cause fxcopcmd.exe to return a non-zero exit code, thereby allowing you to break an automated build.

    If you would prefer that fxcopcmd.exe use your level overrides when generating its report, you may want to consider making a suggestion at http://visualstudio.uservoice.com/.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that contains a boolean field like this one: public class
I have a function like this defined in one class: using System; using System.Collections.Generic;
Hi have one class like this import java.util.ArrayList; public class MobilePhone { private String
I have a simple model like this one: class Artist(models.Model): surname = models.CharField(max_length=200) name
Let's suppose I have xml like this one: <Server Active=No> <Url>http://some.url</Url> </Server> C# class
I have a class like this: class MyClass{ public: MyClass(int Mode); private: std::map <
I have a class like this public class foo { private void getThread() {
I have a class like this: public class Contest { List<ContestTeam> Teams { get;
I have a class looking like this: class FakeRunner : public QObject { Q_OBJECT
Suppose I have a Java class like this: public class Test { static {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.