【发布时间】:2012-12-12 12:00:07
【问题描述】:
我有 VS2010,Windows 7 位,FxCop 10.0
我使用 Process.Start 执行 Fxcopcmd.exe,得到 513 "exitcode"(错误代码)值。
以下参考文献中的托德·金说:
在这种情况下,退出代码 513 表示 FxCop 出现分析错误 (0x01) 和程序集引用错误 (0x200)
http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/1191af28-d262-4e4f-95d9-73b682c2044c/
我觉得如果是这样的
[Flags]
public enum FxCopErrorCodes
{
NoErrors = 0x0,
AnalysisError = 0x1, // -fatalerror
RuleExceptions = 0x2,
ProjectLoadError = 0x4,
AssemblyLoadError = 0x8,
RuleLibraryLoadError = 0x10,
ImportReportLoadError = 0x20,
OutputError = 0x40,
CommandlineSwitchError = 0x80,
InitializationError = 0x100,
AssemblyReferencesError = 0x200,
BuildBreakingMessage = 0x400,
UnknownError = 0x1000000,
}
513整数值为0x201(查看int to hex string和Enum.Parse fails to cast string)
我如何仅使用 exitcode (513 , 0x201) 值以编程方式知道错误(分析错误 (0x01) 和程序集引用错误 (0x200))?
有关 FxCopCmd 的错误代码和代码分析的更多信息:
【问题讨论】:
标签: c# fxcop exit-code error-code fxcopcmd