none
vs2012/.net 4.5 RC Compiler error, when using ActionBlock, missing reference to System.Threading.Tasks RRS feed

  • Question

  • Hello guys,

    I'm using the TDF rc with .net 4.5, but when i declare an ActionBlock the compiler gives this error:

    Error 1 The type 'System.Threading.Tasks.Task' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 

    However there is no such dll when i go to add a reference, and msdn tells me Task is in mscorelib.
    i found this on SO:

    http://stackoverflow.com/questions/10869730/problems-with-references-to-tpl-dataflow-and-tpl-in-vs-2012-rc

    But surely that is not the way to go, atelast not at rtm, is this a bug in TDF or somewhere else? or am i doing something wrong?

    regards/allan

    Thursday, June 7, 2012 10:29 AM

Answers

  • allan, svick,

      Another quick follow up.  If in fact you are using RC bits and hit this issues, please go to your project and remove the reference to System.Runtime, it should compile.  This should get you unblocked immediately.  We have identified the bug causing this and will fix it in the next release.

    Hope that helps

    cheers

    -alok

    • Proposed as answer by Alok Shriram- MSFT Thursday, June 7, 2012 10:16 PM
    • Marked as answer by aL3891 Friday, June 8, 2012 8:50 PM
    Thursday, June 7, 2012 6:51 PM

All replies