Cannot use NCalc due to Namespace conflicts caused by VisualScripting

Hello Unity,

this is a Bug that not only affects users of the NCalc Library but also other Packages that use NCalc.
Here is another related post to this issue:
Exclude DLL From Global Assembly. (NCalc DLL Conflicts with Alias in Visual Scripting Package) - Unity Engine - Unity Discussions

When you import the NCalc.dll you get the following error:

Inside the Visual Scripting Package there is a changed version of NCalc under com.unity.visualscripting@1.8.0\Runtime\VisualScripting.Flow\Dependencies\NCalc

com.unity.visualscripting\Runtime\VisualScripting.Flow\Framework\Formula.cs is referencing its internal NCalc with an alias import which causes the conflict.

A simple solution here is to just use the full namespace path instead of an alias
image

Please make this small change to make the NCalc library usable again. (And maybe avoid aliases in general to avoid more conflicts)

1 Like

You should report this as a bug via official channels. They don’t take action on forum reports typically.

Did you solve it?

Hello folks, thanks for taking time to report this issue. I’m on it, will be fixing that soon. Sorry for the caused inconveniences.