Unity 2017 introduced an experimental .NET 4.6 Mono backend. Given that Mono seems to support the dynamic language runtime, I'm wondering whether we can finally use dynamic
in Unity games (even if it's just PC).
Trying this out with a simple example:
dynamic foo = new System.Dynamic.ExpandoObject();
foo.bar = "bar";
results in an error saying CS0656 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'
. This is after switching to the .NET 4.6 profile.
From what I can gather this is normally solved by adding the Microsoft.CSharp.dll as a reference but for a Unity project, there doesn't seem to be an option to add such a reference.
Does anyone know how to get this to work in Unity 2017 with VS 2017?