Same namespace but different dll version/code

Reference 2 dll. both library have a ‘System.Threading’ namespace but in different version. Unity showing :

error CS0433: The type ‘TaskScheduler’ exists in both ‘System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad335e22’ and ‘Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’

In Visual Studio we can set the dll alias name to different the library. But Unity is not supported ‘extern alias’ → reference

How can I solve it?

Thanks in advance.

Simply do not add using <namespace> at the top of your files and write explicitly the name of the class including the namespace :

Unity.Tasks.TaskScheduler scheduler = ... ;