Skip to content

dataflow-task-parallel-library.md incorrectly states the nuget package System.Threading.Tasks.Dataflow must be installed #47881

@andrewmcclementaveva

Description

@andrewmcclementaveva

Describe the issue or suggestion

docs/standard/parallel-programming/dataflow-task-parallel-library.md includes includes/tpl-install-instructions.md which states that "The TPL Dataflow Library (the xref:System.Threading.Tasks.Dataflow namespace) is not distributed with .NET.". A simple console application can easily be created to disprove this:

Project:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

Program.cs:

using System.Threading.Tasks.Dataflow;

var bufferBlock = new BufferBlock<int>();
Console.WriteLine($"Hello, World! {bufferBlock.Count}");
var assembly = bufferBlock.GetType().Assembly;
Console.WriteLine($"Assembly Version: {assembly.GetName().Version}");
Console.WriteLine($"File Version: {System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion}");

This will print out

Hello, World! 0
Assembly Version: 8.0.0.0
File Version: 8.0.1825.31117

(I also tested with .NET 6.)

The installation instructions are therefore only required on .NET Framework and .NET Standard, and it would be good to update the documentation to better reflect this.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions