加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – .NET Standard 1.6中的System.Threading.Tasks.Parallel在

发布时间:2020-12-15 04:25:46 所属栏目:百科 来源:网络整理
导读:asp.net核心1中的Parrallel在哪里? Parallel.ForEach(results,(x) = { foo(); }); 当前上下文.NETStandard,Version = v1.6中不存在名称“Parallel” 解决方法 您需要对System.Threading.Tasks.Parallel的引用 您可以使用nuget来获取此信息. 或者,将以下内容
asp.net核心1中的Parrallel在哪里?
Parallel.ForEach(results,(x) =>
    {
        foo();
    });

当前上下文.NETStandard,Version = v1.6中不存在名称“Parallel”

解决方法

您需要对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" />

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读