asp.net core 1 中的 Parrallel 在哪里?
Parallel.ForEach(results, (x) =>
{
foo();
});
当前上下文中不存在名称“Parallel”.NETStandard,Version=v1.6
最佳答案
您需要引用 System.Threading.Tasks.Parallel
您可以使用 nuget 来获取它。
或者,将以下内容添加到您的 project.json
"dependencies": {
//
"System.Threading.Tasks.Parallel": "4.0.1"
},
注意:
现在已经过时了,因为不再有 project.json
根据评论,将此添加到您的 csproj:
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
关于c# - .NET Standard 1.6 中的 System.Threading.Tasks.Parallel 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39251744/