FxCop中的CA0055错误

时间:2012-05-16 09:24:23

标签: code-analysis fxcop

我正在尝试在一个项目上手动运行代码分析,但我收到以下错误:CA0055:无法加载xxx.dll。

这是xml日志的详细日志:

<Exception Keyword="CA0055" Kind="AssemblyLoad">
   <Type>Microsoft.FxCop.Common.AssemblyLoadException</Type>
   <ExceptionMessage>Could not load D:\...\bin\debug\xxx.dll.</ExceptionMessage>
   <InnerType>System.IO.InvalidDataException</InnerType>
   <InnerExceptionMessage>Invalid type for custom attribute argument</InnerExceptionMessage>
   <InnerStackTrace>   at   

Phx.Metadata.LoaderImplementation.DeserializePointerTypeConstant(Type type,   
AttributeBlobReader&amp; blobReader, Boolean doResolveEnums)
at Phx.Metadata.LoaderImplementation.DeserializeConstant(Type type,  
AttributeBlobReader&amp; blobReader, Boolean doResolveEnums)
at Phx.Metadata.MetadataLoader.ParseCustomAttribute(AttributeSymbol attributeSymbol,  
Boolean doResolveEnums)
at Microsoft.FxCop.Engines.Phoenix.AssemblyLoader.LoadAttributes(List`1 attributes,  
MetadataLoader metadataLoader)
at Microsoft.FxCop.Engines.Phoenix.AssemblyLoader.LoadAttributes(ProgramUnit 
programUnit, MetadataLoader metadataLoader)
at Microsoft.FxCop.Engines.Phoenix.AssemblyLoader.LoadAssembly(String filePath)
at Microsoft.FxCop.Engines.Phoenix.PhoenixAnalysisEngine.AnalyzeInternal()     

</InnerStackTrace>
</Exception>

路径中存在xxx.dll,允许访问。

有人可以帮助解决可能出错的问题吗?

感谢

1 个答案:

答案 0 :(得分:1)

你可能在Phoenix程序集加载器中遇到了一个错误。遗憾的是,异常详细信息不包含有关Phoenix在轰炸时尝试解析的自定义属性的任何信息,因此几乎无法猜测是否有可用的解决方法。如果您无法共享导致问题的程序集,那么最好的办法是将调试程序附加到fxcopcmd.exe进程,以便您可以尝试提取有关有问题属性的更多信息。

如果您无法执行此操作,但可以与Microsoft共享问题DLL,则可能需要考虑将其上传到https://connect.microsoft.com/VisualStudio/Feedback的私人错误报告中。