locked
How to disable C0060 warning RRS feed

  • Question

  • We have a third party dll A which references another third party dll B. For B we have newer version which is compatible but fxcop always complains that it cannot find exact version of dll. It is very inconvenient because it breaks the build. Build uses fxcopcmd command. In GUI version of fxcop - it shows messagebox on which you can just press "Skip" and this message is ignored.

     

    Is there any way to ignore this message in fxcopcmd?

     

    Hre is the message which we receive in output file:

    <Exceptions>
      <Exception Keyword="CA0060" Kind="Engine" TreatAsWarning="True">
       <Type>Microsoft.FxCop.Sdk.FxCopException</Type>
       <ExceptionMessage>The indirectly-referenced assembly 'referencedAssemblyName Version=8.1.20.168, Culture=neutral, PublicKeyToken=4544464cdeaab541' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: 'referencingAssemblyName'.</ExceptionMessage>
      </Exception>
     </Exceptions>

     

    Normally rules can be ignored by unchecking their check box in Rules tab, but for this warning we cannot find any check box.

    Description of C0060 warning on msdn suggest to add reference to the dll to the project. The problem for us is that we do not have exactly the required version - we only have newer one. The web site of the provider of the dll says that newer version is fully compatible with old.

     

    Any help will be greatly appreciated

    Wednesday, April 16, 2008 9:35 PM

Answers

  • Try editing the FxCopCmd.exe.config file and changing the value of AssemblyReferenceResolveMode from "StrongName" to "StrongNameIgnoringVersion" like so:

     

    <add key="AssemblyReferenceResolveMode" value="StrongNameIgnoringVersion" />

     

    -Todd

    Wednesday, April 16, 2008 10:09 PM
    Moderator

All replies

  • Try editing the FxCopCmd.exe.config file and changing the value of AssemblyReferenceResolveMode from "StrongName" to "StrongNameIgnoringVersion" like so:

     

    <add key="AssemblyReferenceResolveMode" value="StrongNameIgnoringVersion" />

     

    -Todd

    Wednesday, April 16, 2008 10:09 PM
    Moderator
  • It works, Thank you!

    Thursday, April 17, 2008 1:02 PM