Bug 12292 - Error converting PCL 4.5 mscorlib
Summary: Error converting PCL 4.5 mscorlib
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-05-17 15:22 UTC by Mikayla Hutchinson [MSFT]
Modified: 2015-06-09 05:10 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2013-05-17 15:22:44 UTC
The C# completion engine is unable to convert the PCL 4.5 Profile7 mscorlib. Note that this is the MS assembly, which I had installed on my Mac.

Also, no idea why it's loading this assembly when I open md-addins.sln.

ERROR [2013-05-17 15:17:20Z]: Can't convert assembly: /Library/Frameworks/Mono.framework/External/xbuild-frameworks/.NETPortable/v4.5/Profile/Profile7/mscorlib.dll
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Cecil.TypeSystem.LookupSystemType (System.String name, ElementType element_type) [0x0000e] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/TypeSystem.cs:172 
  at Mono.Cecil.TypeSystem.get_Void () [0x00001] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/TypeSystem.cs:198 
  at Mono.Cecil.SignatureReader.ReadTypeSignature (ElementType etype) [0x001db] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2800 
  at Mono.Cecil.SignatureReader.ReadTypeSignature () [0x00001] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2745 
  at Mono.Cecil.SignatureReader.ReadMethodSignature (IMethodSignature method) [0x0009b] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2840 
  at Mono.Cecil.MetadataReader.ReadMemberReferenceSignature (UInt32 signature, Mono.Cecil.TypeReference declaring_type) [0x00059] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2213 
  at Mono.Cecil.MetadataReader.ReadTypeMemberReference (MetadataToken type, System.String name, UInt32 signature) [0x0001b] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2193 
  at Mono.Cecil.MetadataReader.ReadMemberReference (UInt32 rid) [0x0006a] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2172 
  at Mono.Cecil.MetadataReader.GetMemberReference (UInt32 rid) [0x00021] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2151 
  at Mono.Cecil.MetadataReader.LookupToken (MetadataToken token) [0x000c8] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2053 
  at Mono.Cecil.MetadataReader.ReadCustomAttributes (ICustomAttributeProvider owner) [0x00056] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyReader.cs:2352 
  at Mono.Cecil.Mixin.<GetCustomAttributes>m__A (ICustomAttributeProvider provider, Mono.Cecil.MetadataReader reader) [0x00000] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/ICustomAttributeProvider.cs:56 
  at Mono.Cecil.ModuleDefinition.Read[ICustomAttributeProvider,Collection`1] (ICustomAttributeProvider item, System.Func`3 read) [0x00019] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/ModuleDefinition.cs:818 
  at Mono.Cecil.Mixin.GetCustomAttributes (ICustomAttributeProvider self, Mono.Cecil.ModuleDefinition module) [0x00001] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/ICustomAttributeProvider.cs:55 
  at Mono.Cecil.AssemblyDefinition.get_CustomAttributes () [0x00001] in /Users/michael/Mono/monodevelop/main/external/cecil/Mono.Cecil/AssemblyDefinition.cs:90 
  at ICSharpCode.NRefactory.TypeSystem.CecilLoader.AddAttributes (Mono.Cecil.AssemblyDefinition assembly, IList`1 outputList) [0x0000d] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs:463 
  at ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadModule (Mono.Cecil.ModuleDefinition moduleDefinition) [0x00033] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs:186 
  at ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadAssembly (Mono.Cecil.AssemblyDefinition assemblyDefinition) [0x00012] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs:166 
  at MonoDevelop.Ide.TypeSystem.TypeSystemService+LazyAssemblyLoader.LoadAssembly () [0x00095] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:1955
Comment 1 Mike Krüger 2013-05-24 03:43:23 UTC
In any case it's a bug in cecil ... which reminds me again that I wanted to switch to IKVM for assembly loading :/
Comment 2 Mike Krüger 2015-06-09 05:10:38 UTC
We switched to IKVM a while ago - and 6.0 is now using roslyn for assembly loading.

Closing that one. (Should work at least in 6.x)