While refactoring, moving around some assemblies around, etc. I compiled a solution in Visual Studio and got back a single error message: "FxCop exited with error code 512". The build seems fine other than this one error.
Anyone know what this actually means in detail? Where might I start looking to figure out how to fix it? Setting FailOnError to false is not a path I want to go down.
The other answers are all on the right track but miss one small part.
In order to run FxCop from the command line I had to execute the following:
FxCopCmd.exe /f:<Assembly.dll> /o:<OutputFileName> /verbose
FxCopCmd is what is MSBuild Task uses. It will return error code 512 if there is a missing assembly even if the assembly is not needed for it to run. See the below FxCop message:
The indirectly-referenced assembly 'Newtonsoft.Json, Version=4.0.2.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: Removed.dll.
Add the reference to that dll and then the error code disappears.