Failing to load .NET core libraries

Jan 26, 2012 at 5:32 AM

I am trying to do a code analysis task which involves using the bodies of methods in libraries. Some libraries on my system load just fine with CCI. Some others cause CCI to crash, while others have every method body empty.

An example of the latter (every method body empty) is
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll


An example of the former (crashes with a contract failure "Description: Assumption failed." in Microsoft.Cci.IlToCodeModel.TypeInferencer.GetBinaryNumericOperationType(IBinaryOperation)) is


The crash occurs within the statement "finder.Traverse(result);" in the method GetCodeModelFromMetadataModelHelper in the class Microsoft.Cci.ILToCodeModel.Decompiler.

Jan 26, 2012 at 6:16 AM

Reference assemblies only have metadata, so it is expected that every method body is empty.

I'll look into the crash.

Jan 26, 2012 at 5:59 PM

Changeset 67429 should fix the crash for you.