Using System.Dynamic in Roslyn

后端 未结 5 1859
死守一世寂寞
死守一世寂寞 2020-12-05 03:28

I modified the example that comes with the new version of Roslyn that was released yesterday to use dynamic and ExpandoObject but I am getting a compiler error which I am no

5条回答
  •  一整个雨季
    2020-12-05 04:13

    You may also want to check the properties of all your project references. Make sure any reference is using .NET newer than 2.0. I have a project that was referencing another project in the same solution and had to rebuild the dependency using a newer .NET framework target.

    See this post.

    Also, don't forget to add the Microsoft.CSharp reference to you main project like @Alberto said.

提交回复
热议问题