1

Command line:

 "C:\Program Files (x86)\Microsoft Fxcop 10.0\FxCopCmd.exe" /file:XXX.exe /out:fxcop-report.xml /outxsl:none /forceoutput /searchgac /assemblyCompareMode:StrongNameIgnoringVersion /verbose 

Error from report:

   <Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
   <ExceptionMessage>Could not load XXX.</ExceptionMessage>
   <InnerType>Microsoft.FxCop.Sdk.InvalidMetadataException</InnerType>
   <InnerExceptionMessage>The following error was encountered while reading module 'XXX': Security attribute type does not have a default constructor: System.Security.Permissions.SecurityPermission.</InnerExceptionMessage>

Anyone any ideas?

Cristik
  • 30,989
  • 25
  • 91
  • 127
Adrian Rus
  • 329
  • 1
  • 4
  • 9
  • Does module XXX contain any subclasses of CodeAccessPermissionAttribute? If so, do any of them deviate from the instructions regarding constructors in the "Notes to Inheritors" section at https://msdn.microsoft.com/en-us/library/system.security.permissions.codeaccesssecurityattribute.aspx#remarksToggle? – Nicole Calinoiu May 20 '15 at 14:15
  • Long story short, it was from an IKVM generated assembly which was merged (il-merge) into our primary assembly. I think we can avoid running FXCop against the merged assembly. – Adrian Rus Jul 30 '15 at 13:48

0 Answers0