Bug 8016 - TypeLoadException while compiling md-addins with Mono master
Summary: TypeLoadException while compiling md-addins with Mono master
Status: RESOLVED INVALID
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- major
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-10-26 11:06 UTC by Bojan Rajkovic [MSFT]
Modified: 2013-05-17 17:06 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 GitHub or Developer Community 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 INVALID

Description Bojan Rajkovic [MSFT] 2012-10-26 11:06:36 UTC
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Type 'System.Collections.Concurrent.IProducerConsumerCollection`1' not found in assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
				  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IKVM.Reflection.Type[] genericTypeArguments, IKVM.Reflection.Type[] genericMethodArguments) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Signature.ReadTypeDefOrRefEncoded (IKVM.Reflection.Reader.ModuleReader module, IKVM.Reflection.Reader.ByteReader br, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Signature.ReadGenericInst (IKVM.Reflection.Reader.ModuleReader module, IKVM.Reflection.Reader.ByteReader br, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Signature.ReadType (IKVM.Reflection.Reader.ModuleReader module, IKVM.Reflection.Reader.ByteReader br, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Signature.ReadTypeSpec (IKVM.Reflection.Reader.ModuleReader module, IKVM.Reflection.Reader.ByteReader br, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IGenericContext context) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Reader.TypeDefImpl.__GetDeclaredInterfaces () [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Type.AddInterfaces (System.Collections.Generic.List`1 list, IKVM.Reflection.Type type) [0x00000] in <filename unknown>:0 
				  at IKVM.Reflection.Type.GetInterfaces () [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.MetadataImporter.ImportTypeBase (Mono.CSharp.TypeSpec spec, IKVM.Reflection.Type type) [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.MetadataImporter.ImportTypes (IKVM.Reflection.Type[] types, Mono.CSharp.Namespace targetNamespace, Boolean hasExtensionTypes) [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
				  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

When compiling Mono master, using:

[md-dev-env][~/Code/Xamarin/md-addins (ui-refresh)⚡] ➔ mono --version
Mono JIT compiler version 3.0.1 (master/041c72e Thu Oct 25 11:33:46 EDT 2012)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.1svn-mono)
	GC:            Included Boehm (with typed GC)
Comment 1 Marek Safar 2012-10-29 07:01:57 UTC
This looks like valid bug but I cannot reproduce it.

Using mono master
MD ui-refresh a4315da1ee98e29fe1a1a031be416e4e73f26d5c
md-addin ui-refresh 1368b320889f811ef89b62d44f22966c7717811c
Comment 2 Bojan Rajkovic [MSFT] 2012-10-29 12:37:05 UTC
Not a bug—bad paths caused mismatching Mono loads, leading to this (admittedly confusing) exception.
Comment 3 David Lechner 2013-05-17 17:06:14 UTC
I am getting this error too. I suspect that it has to do with trying to run parallel mono versions. Do you remember what path was bad?