2

I'm trying to Run Code Analysis manually on one project and I'm getting following error: CA0055: Could not load xxx.dll.

This is detailed log from xml log:

<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>

The xxx.dll exists in the path and the access is allowed.

Can somebody help what can be wrong?

thanks

4

1 回答 1

1

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

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

于 2012-05-17T14:24:20.990 回答