none
Unwanted syntax changes to FxCop file

    Question

  • I have already asked this question on Stack Overflow but it has not received any attention. I'm not sure which forum it should go in on MSDN, so posting it here.

    We use FxCop on our project. All of our code is in C#.

    When some developers make FxCop changes (e.g. remove suppressions) many unwanted changes are made to the FxCop file. For other developers, this does not happen.

    This is an example of a portion of the file before making changes (this portion is unrelated to the changes we wanted to make):

    <Member Name="#Bar`1(!!0,!!0)">
      <Messages>
        <Message Id="Bar" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Excluded" >
          <Issue Name="Member">
            <Item>Bar</Item>
            <Item>Foo.Bar&lt;T&gt;(T, T)'</Item>
            <Item>Bar</Item>
          </Issue>
        </Message>
      </Messages>
    </Member>
    <Member Name="#Bar(System.Int32,System.Int32)">
      <Messages>
        <Message Id="Bar" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Excluded" >
          <Issue Name="Member">
            <Item>Bar</Item>
            <Item>Foo.Bar(int, int)'</Item>
            <Item>Bar</Item>
          </Issue>
        </Message>
      </Messages>
    </Member>

    Afterwards, the same section looks like this:

    <Member Name="#Bar`1(!!0,!!0)">
      <Messages>
        <Message Id="Bar" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Excluded" >
          <Issue Name="Member">
            <Item>Bar</Item>
            <Item>Foo.Bar(Of T)(T, T)'</Item>
            <Item>Bar</Item>
          </Issue>
        </Message>
      </Messages>
    </Member>
    <Member Name="#Bar(System.Int32,System.Int32)">
      <Messages>
        <Message Id="Bar" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Status="Excluded" >
          <Issue Name="Member">
            <Item>Bar</Item>
            <Item>Foo.Bar(Integer, Integer)'</Item>
            <Item>Bar</Item>
          </Issue>
        </Message>
      </Messages>
    </Member>

    So it looks like C# syntax is being changed to VB.NET syntax throughout (e.g. becomes (Of T), int becomes Integer).

    The number of changes makes it almost impossible to see what changes were actually made when looking at the diff.

    We are all on the same version of FxCop. We've looked through the settings and found nothing we could change, tried re-installing, Googled aplenty... does anyone have any suggestions on what might be causing this?

    Monday, April 18, 2016 10:21 AM

Answers

All replies