0
Answered

error CS0433: The imported type `System.Threading.SpinLock' is defined multiple times

HAHA 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 1

 HI,

I just installed bolt and added it to an my project.

error CS0433: The imported type `System.Threading.SpinLock' is defined multiple times 

My project is already using "System.Threading.SpinLock".

How can I solve this?



Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Answered

Hi Haha,

I'm assuming you're using .NET 4.6 in your project. This causes a type ambiguity in the DLL that Bolt provides (System.Threading), as it was now moved to be part of mscorlib in .NET 4.6.

This is related to this other issue: https://support.ludiq.io/communities/5/topics/233-systemthreadingtasks-does-not-work-with-net-46

The issue was "fixed" on my end by building .NET 4.6 DLLs that do not include a separate System.Threading DLL, however, there is currently a Unity bug that prevents these DLLs to be imported: 

https://forum.unity.com/threads/monobehaviours-and-scriptableobjects-are-not-recognized-in-4-6-dll.521487/

https://issuetracker.unity3d.com/issues/monobehaviours-and-scriptable-objects-are-not-recognized-in-4-dot-6-dll

The Unity team is actively working on fixing the issue, but it is currently out of my hands.