Threading.task.dll 中的冲突 [英] Conflict in Threading.task.dll

查看:21
本文介绍了Threading.task.dll 中的冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Resharper 的 nuget 包并构建了解决方案,然后我在每个任务类型方法上都收到了这些错误.好像是因为两个Threading.Task.dll文件.

I have just installed the nuget package of Resharper and build the solution then I am getting these error on each Task type methods. It seems that it is because of two Threading.Task.dll files.

错误:

错误 87 类型 'System.Threading.Tasks.Task' 存在于 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Threading.Tasks.dll'和 'C:\Users\emp70\Documents\Visual Studio 2012\Projects\FSOP\packages\JetBrains.ReSharper.SDK.8.2.1158\build\..\Bin\System.Threading.dll' C:\Users\emp70\Documents\Visual Studio 2012\Projects\FSOP\FSOP\ViewModel\DashBoardVM.cs 1604 22 FSOP

Error 87 The type 'System.Threading.Tasks.Task' exists in both 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Threading.Tasks.dll' and 'C:\Users\emp70\Documents\Visual Studio 2012\Projects\FSOP\packages\JetBrains.ReSharper.SDK.8.2.1158\build\..\Bin\System.Threading.dll' C:\Users\emp70\Documents\Visual Studio 2012\Projects\FSOP\FSOP\ViewModel\DashBoardVM.cs 1604 22 FSOP

如何解决这个冲突?

在安装 Resharper 之前,一切正常.

Before installing Resharper everything was just working fine.

推荐答案

很遗憾,这是 SDK 的一个已知问题.ReSharper 是一个 .net 3.5 应用程序,我们使用 System.Threading.Tasks 的一个端口来获得任务支持.可悲的是,这会与 .net 4 项目发生冲突.这是我们在下一个版本中积极解决的问题 - SDK 和架构有重大变化.

Unfortunately, this is a known issue with the SDK. ReSharper is a .net 3.5 application, and we're using a port of System.Threading.Tasks to get Task support. Sadly, this gives conflicts with a .net 4 project. This is something we're actively addressing in the next version - there are major changes to the SDK and the architecture in the works.

遗憾的是,没有完全令人满意的解决方法.您可以将您的插件设置为 .net 3.5 插件,但是您会收到很多关于 .net 4 程序集的警告,这些程序集被引用但不会被使用 - 您可以放心地忽略这些,因为它们本质上是最终用户功能你不需要在你的插件中引用,但它们很烦人(这就是我所做的).或者,您不能使用 Task.同样,不理想,但我已经写了很多插件,还没有使用 Task .天啊.

Sadly, there isn't an entirely satisfactory workaround. You can make your plugin a .net 3.5 plugin, but then you'll get a lot of warnings about .net 4 assemblies that are referenced but won't get used - you can safely ignore these, as they're essentially end user features that you won't need to reference in your plugin, but they're annoying (this is what I do). Alternatively, you can not use Task. Again, not ideal, but I've written quite a few plugins, and haven't had to use Task yet. YMMV.

这篇关于Threading.task.dll 中的冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆