Where is Parrallel in asp.net core 1?
Parallel.ForEach(results, (x) =>
{
foo();
});
The name 'Parallel' does not exist in the current context .NETStandard,Version=v1.6
You'll need a reference to System.Threading.Tasks.Parallel
You can use nuget to get this.
Alternatively, add the following to your project.json
"dependencies": {
//
"System.Threading.Tasks.Parallel": "4.0.1"
},
Note:
This is now out of date, since there's no more project.json
As per comment, add this to your csproj:
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With