Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:22:39+00:00 2026-06-05T03:22:39+00:00

I just upgraded Visual Studio 11 Beta to the new Visual Studio 2012 RC

  • 0

I just upgraded Visual Studio 11 Beta to the new Visual Studio 2012 RC and have problems referencing TPL Dataflow.

First, I tried to reference Dataflow as I did previously, by adding a reference from the framework. But when I try to do that, I get an error box:

A reference to ‘System.Threading.Tasks.Dataflow’ could not be added.

and then the whole Visual Studio freezes.

After reading MEF and TPL Dataflow NuGet Packages for .NET Framework 4.5 RC, I assumed the version of Dataflow that showed in the references list was some kind of artifact of the previous installation. So, I tried using Dataflow from NuGet, which seemed to work, until I actually tried to compile my code, because I got an error:

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’.

This is confusing, because Task is in mscorlib, no other references should be necessary. But there is a reference assembly called System.Threading.Tasks in the references list, so I tried to add that. Unfortunately, a familiar error showed:

A reference to ‘System.Threading.Tasks’ could not be added.

and then Visual Studio froze again.

Am I doing something wrong? How can I use TPL Dataflow with VS 2012 RC?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:22:41+00:00Added an answer on June 5, 2026 at 3:22 am

    Try to “Add Reference” the System.Threading.Tasks.dll explicitly from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5. Alternatively you can use C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades directory.

    UPDATED: I examined the problem more after reading of the answer about removing the reference to System.Runtime and I can add the following: The reference to System.Runtime will be added because of the error in the currect version of NuGet package Microsoft.Tpl.Dataflow.4.5.1-rc. If one add the reference to the same System.Threading.Tasks.Dataflow.dll directly in Visual Studio no System.Runtime reference will be added and no problem exist.

    Using NuGet Package Explorer one can download the original Microsoft.Tpl.Dataflow.4.5.1-rc.nupkg from the “NuGet official package source”. At the end of the Package Matadata one will see

    enter image description here

    One can modify the metadata (press Ctrl-K) and remove the reference:

    enter image description here

    After that one can save the modified file Microsoft.Tpl.Dataflow.4.5.1-rc.nupkg in some directory. After adding new location (the local directory) in the list of NuGet sources (see here or here) one will be able to add new package from the local source (don’t forget to choose to display all packages inclusive pre-release see the picture below):

    enter image description here

    The modified Microsoft.Tpl.Dataflow.4.5.1-rc.nupkg will not add System.Runtime and the project will be compiled without errors.

    So the bug exist not in Visual Studio 2012 RC and even not in Microsoft.Tpl.Dataflow.dll. The bug is just in the metadata of the pre-release version of Microsoft.Tpl.Dataflow NuGet package available currently on “NuGet official package source”.

    You can post the bug report to the autors so that the package will be fixed.

    UPDATED 2: Even if my answer are already marked as solved and the bounty awarded the problem still not go from my head. In reality I see two opened problems:

    1. Why the existence of unused assembly System.Runtime can produce the error during the builging of the project.
    2. I see some general problems in the way how Uninstall or Update of NuGet packages works (see details later).

    Let us we accept just the fact that the first problem exist independent from the reason. The second problem make me restlessness. I see the real problem here. Everybody can make the following experiment to understand me better:

    1. Create a new empty console application in Visual Studio 2012 RC.
    2. Verify that the project has no reference to System.Runtime.
    3. Open “Package Manager Console” from “Tools” / “Library Package Manager”.
    4. Execute the command “Install-Package Microsoft.Tpl.Dataflow -Pre” in the “Package Manager Console”.
    5. Verify that both System.Runtime and System.Threading.Tasks.Dataflow are included in the list of References of the project.
    6. Execute the command “Uninstall-Package Microsoft.Tpl.Dataflow” in the “Package Manager Console”.
    7. Verify that System.Threading.Tasks.Dataflow are removed from the list of References of the project, but System.Runtime is still in the list of references.

    I made one more experiment and I changed the version of modified Microsoft.Tpl.Dataflow.4.5.1-rc.nupkg, where I removed the reference to System.Runtime, from 4.5.1-rc to 4.5.1-rc1 and saved it locally (it will be saved under Microsoft.Tpl.Dataflow.4.5.1-rc1.nupkg). After that I could see “new” version in the list of Updates to my project:

    enter image description here

    If I install the Update the reference to System.Runtime will be also not removed.

    So the current implementation of “Update” and “Uninstall” of NuGet has the bug or general design problem. If we added a package to our project and make some updates of the project we will get references of all dependent assemblies of all old versions. The old references, added by NuGet from old versions of the package, will be not removed during Uninstall or Update. First of all it’s not good itself to have garbage in the project references, but because of existence the first problem (error during compilation if the reference to unreferenced System.Runtime exist) the problem will be even more serious.

    So if nothing will be changed in NuGet the update to the next version of Microsoft.Tpl.Dataflow will not solve the problem for the users who installed Microsoft.Tpl.Dataflow in version 4.5.1 (or probably early version). All users will have to remove the reference to System.Runtime manually. I think that it’s real NuGet problem which have to be solved by NuGet developers. I will post the description of the problem to http://nuget.org/ later.

    The bug report which I posted to NuGet can be found here (sorry for not perfect formatting of the text).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is an extremely frustrating situation. We have just upgraded to Visual Studio 2010
I have several projects that I just upgraded from Visual Studio 2003 and ASP.NET
I just upgraded to the beta 2 of Crystal Reports for Visual Studio 2010
I just upgraded my operating system to Windows 7. Visual Studio 2008 also seems
I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have
We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of
I just upgraded to Visual Studio 2010 and MVC 2.0 and I noticed the
I just upgraded to Visual Studio 2010, and I am playing around with the
I just installed Visual Studio 2010 Beta 2 on my hard drive. I also
Is there any way to set up Visual Studio (just upgraded from 2008 to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.