Where is System.Threading.Tasks.Parallel located in .NET Standard 1.6?

Where is Parrallel in asp.net 1 core?

Parallel.ForEach(results, (x) => { foo(); }); 

The name "Parallel" does not exist in the current context .. NETStandard, Version = v1.6

+5
source share
2 answers

You will need a link to System.Threading.Tasks.Parallel

You can use nuget to get this.
Also add the following to project.json

  "dependencies": { // "System.Threading.Tasks.Parallel": "4.0.1" }, 

Note: This is now deprecated since there is more project.json

According to the comment, add this to your csproj:

 <PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" /> 
+12
source

Parallel Not Available in .Net Standard 1.6

-3
source

All Articles