小编Tra*_*yek的帖子

FxCop Phoenix分析引擎出错

所以我试图运行一系列在RuleSet中定义的规则.RuleSet文件实际上是使用Sonarqube生成的 - 我已经选择了绝对的所有规则,包括FxCop,ReSharper和StyleCop规则.我正在开这样的FxCop:

C:/FxCop/FxCopCmd.exe /file:C:\TestProject\bin\TestProject.dll /ruleset:=C:\TestProject\testproject.ruleset /out:C:\TestProject\fxcop-report.xml /outxsl:none /forceoutput /searchgac /aspnet
Run Code Online (Sandbox Code Playgroud)

它正确启动,但我收到以下消息:

初始化Introspection引擎...
分析...
初始化Phoenix引擎......
分析...
分析完成.
*1总分析引擎异常.

XML输出包含以下内容:

<Exception Keyword="CA0001" Kind="Engine">
    <Type>Phx.FatalError</Type>
    <ExceptionMessage>Exception of type 'Phx.FatalError' was thrown.</ExceptionMessage>
    <StackTrace>   at Phx.FatalError.Dispatch()
        at Phx.Logging.Diagnostics.DiagnosticMessage.LogMessage(Severity severity, DiagnosticInfo diagnosticInfo, SourceContext sourceContext, String descriptionString)
        at Phx.PE.PEUtilities.UserError(String infoMessage)
        at Phx.Pdb.ReaderImplementation.Open(Boolean loadTypeOnly)
        at Phx.PEModuleUnit.LoadPdb()
        at Phx.PE.ReaderPhase.CheckSymbolicInformation()
        at Phx.PEModuleUnit.LoadGlobalSymbols()
        at Phx.PEModuleUnit.LoadEncodedIRUnitList()
        at Phx.PEModuleUnit.GetEnumerableContributionUnit(ContributionUnitEnumerationKind contributionUnitEnumerationKind)
        at Phx.PEModuleUnit.GetEnumerableContributionUnit()
        at Microsoft.FxCop.Engines.Phoenix.PreScanPass.GetFunctionUnits(PEModuleUnit peModuleUnit)
        at Microsoft.FxCop.Engines.Phoenix.PreScanPass.Execute(ModuleUnit moduleUnit)
        at Phx.Passes.Pass.DoPass(ModuleUnit moduleUnit)
        at Phx.Passes.PassList.DoPassList(ModuleUnit moduleUnit)
        at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.Host.ExecutePasses(PEModuleUnit peModuleUnit)
        at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.AnalyzeInternal()
        at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.Analyze()
        at …
Run Code Online (Sandbox Code Playgroud)

code-analysis fxcop static-code-analysis

5
推荐指数
2
解决办法
1595
查看次数