ReSharper errors - Cannot convert type from mscorlib to type from System.Runtime

Todd Menier

I have a .NET 4.5 class library (containing tests) with a project reference to a portable class library. The PCL targets the following platforms:

  • .NET Framework 4.5
  • Windows 8
  • Xamarin.Android
  • Xamarin.iOS
  • Xamarin.iOS (Classic)

I'm on Visual Studio 2013 Premium with ReSharper 6. At some point recently, I started seeing many, many inline warnings (red squiggly underlines) in the test project indicating the following or similar:

Cannot convert source type 'string [mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]'
    to target type 'string [System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]'

There are no build errors or warnings, just the annoying inline errors. If I turn off "Enable code analysis" in ReShaper's settings, they go away, but of course so do many helpful features. This started happening just recently but I can't pinpoint what triggered it. I did upgrade from Windows 8.1 to Windows 10 recently, not sure if that has anything to do with it. Any tips that might help me pinpoint the cause would be greatly appreciated.

ulrichb

Could you test your solution with the latest R# version? There were known issues with PCL references, for example RSRP-430728.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0 Error

From Dev

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly but it's not mscorlib

From Dev

Assert.IsInstanceOfType cannot convert from object to System.Type

From Dev

Assert.IsInstanceOfType cannot convert from object to System.Type

From Dev

Type mismatch: cannot convert from boolean to int

From Dev

Type mismatch: cannot convert from ListFragment to Fragment

From Dev

Type mismatch: cannot convert from long to int

From Dev

Type missmatch cannot convert from Fragment to fragment

From Dev

type mismatch: cannot convert from double to Double

From Dev

Type mismatch cannot convert from String to String[]

From Dev

Type mismatch: cannot convert from Scanner to boolean

From Dev

Type mismatch: cannot convert from void to Integer

From Dev

Type mismatch: cannot convert from int to TextView

From Dev

Type mismatch: cannot convert from void to int

From Dev

Type mismatch : cannot convert from double[][] to double[]

From Dev

Type mismatch: cannot convert from boolean to double

From Dev

Type mismatch cannot convert from String to String[]

From Dev

Type mismatch: cannot convert from double to double[]

From Dev

Type mismatch: cannot convert from void to Thread

From Dev

Type Type mismatch: cannot convert from RegisterFragment to Fragment

From Dev

Type mismatch: cannot convert from element type Object to Cookie

From Dev

type mismatch cannot convert from element type object to string

From Dev

Java - Type mismatch: cannot convert from element type Object to String

From Dev

type mismatch cannot convert from element type object to string

From Dev

Type mismatch: cannot convert from element type Object to Cookie

From Dev

Java - Type mismatch: cannot convert from element type Object to String

From Dev

Type mismatch: cannot convert from element type Object to List

From Dev

2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

From Dev

Cannot implicitly convert type from System.Collection.Generic.IEnumerable.MyClass<Node> to MyClass<Node>

Related Related

  1. 1

    Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0 Error

  2. 2

    Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly but it's not mscorlib

  3. 3

    Assert.IsInstanceOfType cannot convert from object to System.Type

  4. 4

    Assert.IsInstanceOfType cannot convert from object to System.Type

  5. 5

    Type mismatch: cannot convert from boolean to int

  6. 6

    Type mismatch: cannot convert from ListFragment to Fragment

  7. 7

    Type mismatch: cannot convert from long to int

  8. 8

    Type missmatch cannot convert from Fragment to fragment

  9. 9

    type mismatch: cannot convert from double to Double

  10. 10

    Type mismatch cannot convert from String to String[]

  11. 11

    Type mismatch: cannot convert from Scanner to boolean

  12. 12

    Type mismatch: cannot convert from void to Integer

  13. 13

    Type mismatch: cannot convert from int to TextView

  14. 14

    Type mismatch: cannot convert from void to int

  15. 15

    Type mismatch : cannot convert from double[][] to double[]

  16. 16

    Type mismatch: cannot convert from boolean to double

  17. 17

    Type mismatch cannot convert from String to String[]

  18. 18

    Type mismatch: cannot convert from double to double[]

  19. 19

    Type mismatch: cannot convert from void to Thread

  20. 20

    Type Type mismatch: cannot convert from RegisterFragment to Fragment

  21. 21

    Type mismatch: cannot convert from element type Object to Cookie

  22. 22

    type mismatch cannot convert from element type object to string

  23. 23

    Java - Type mismatch: cannot convert from element type Object to String

  24. 24

    type mismatch cannot convert from element type object to string

  25. 25

    Type mismatch: cannot convert from element type Object to Cookie

  26. 26

    Java - Type mismatch: cannot convert from element type Object to String

  27. 27

    Type mismatch: cannot convert from element type Object to List

  28. 28

    2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

  29. 29

    Cannot implicitly convert type from System.Collection.Generic.IEnumerable.MyClass<Node> to MyClass<Node>

HotTag

Archive