2

I noticed I get one line of code underlined. If I understand correctly, the error means that I have two different versions of some library in my solution. However the error doesn't stop the solution from compiling and everything works like it's supposed to work. What is the reason of Visual Studio underlining this line of code? How can I stop this from happening? Where to look for some incoherence?

The exact error is:

Cannot convert instance argument type 'System.Threading.Tasks.Task [mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]' to 'System.Threading.Tasks.Task [System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]'

enter image description here

I use Nito.AsyncEx v3.0.1 package in a WebApi (v5.2.3 I think) solution which targets .NET Framework 4.5.1. Let me know if you need any more information.

Kelu Thatsall
  • 2,494
  • 1
  • 22
  • 50

1 Answers1

0

I removed reference to System.Runtime and it seems it fixed the issue. I followed the advices from below question kind of blindly, but it seems it was the same issue.

Problems with references to TPL Dataflow and TPL in VS 2012 RC

Community
  • 1
  • 1
Kelu Thatsall
  • 2,494
  • 1
  • 22
  • 50