loop
loop

Reputation: 9242

Conflict in 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.

Error :

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

How to solve this conflict ?

Before installing Resharper everything was just working fine.

Upvotes: 1

Views: 273

Answers (2)

wilson0x4d
wilson0x4d

Reputation: 8749

Simply deleting/renaming the copy of System.Threading.dll within the packages folder should resolve the ambiguity, you should contact jetbrains to get it properly fixed.

Upvotes: 0

citizenmatt
citizenmatt

Reputation: 18583

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.

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.

Upvotes: 2

Related Questions