Bug 28616 - Error CS1684: Reference to type `System.IConvertible' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found
Summary: Error CS1684: Reference to type `System.IConvertible' claims it is defined as...
Status: RESOLVED FEATURE
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.2.0 (C6)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-04-01 02:16 UTC by Bart Robertson
Modified: 2016-06-21 14:16 UTC (History)
6 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 FEATURE

Description Bart Robertson 2015-04-01 02:16:29 UTC
Error CS1684: Reference to type `System.IConvertible' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found

This occurs when I try to access the Rssi property (public virtual nint) on the CLBeacon class in a PCL.
Comment 1 Sebastien Pouliot 2015-04-01 09:02:59 UTC
That's a compiler error (and the compiler ships with mono, not XI). OTOH I don't think it's a compiler bug. Maybe you're not using a correct PCL profile ?

Can you attach a test case ?
Comment 2 Alexander Jesner 2015-12-14 08:44:10 UTC
I encountred a similar case with dmcs 4.2.1.0:

Reference to type `System.Collections.Generic.IReadOnlyList`1<byte>' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found.


How to reproduce:

1) Download the Akka EchoServer example from Github: https://github.com/akkadotnet/akka.net/tree/dev/src/examples/TcpEchoService.Server

2) Get the Akka 1.0.5 libraries (https://www.nuget.org/packages/Akka/1.0.5). 

3) Try to compile:
dmcs Actors.cs Program.cs -r:Akka.1.0.5/lib/net45/Akka.dll -out:AkkaTest.exe  



This yields 4 errors. I suppose error #3 and #4 are follow up errors:

Actors.cs(42,61): error CS7069: Reference to type `System.Collections.Generic.IReadOnlyList`1<byte>' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found
/tmp/akka/Akka.1.0.5/lib/net45/Akka.dll (Location of the symbol related to previous error)
Actors.cs(42,61): error CS7069: Reference to type `System.Collections.Generic.IReadOnlyCollection`1<byte>' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found
/tmp/akka/Akka.1.0.5/lib/net45/Akka.dll (Location of the symbol related to previous error)
Actors.cs(47,28): error CS1928: Type `Akka.Actor.IActorRef' does not contain a member `Tell' and the best extension method overload `Akka.Actor.ActorRefImplicitSenderExtensions.Tell(this Akka.Actor.IActorRef, object)' has some invalid arguments
/tmp/akka/Akka.1.0.5/lib/net45/Akka.dll (Location of the symbol related to previous error)
Actors.cs(47,28): error CS1501: No overload for method `Tell' takes `1' arguments
/tmp/akka/Akka.1.0.5/lib/net45/Akka.dll (Location of the symbol related to previous error)
Compilation failed: 4 error(s), 0 warnings
Comment 3 Sebastien Pouliot 2016-06-19 20:48:45 UTC
The last comment shows this is (or was) an issue unrelated to XI -> BCL
Comment 4 Marek Safar 2016-06-21 14:16:06 UTC
That's feature.

dmcs is compiler explicitly targeting .net 4.0 only (and it's obsolete now). You need to use mcs if you want to use types introduced in .net 4.5 and newer such as System.Collections.Generic.IReadOnlyList