开发者

UseHostCompilerIfAvailable False causes an "One or more types required to compile a dynamic expression cannot be found" error

The C# dynamic type seems not to compile when UseHostCompilerIfAvailable is s开发者_JAVA技巧et to false. I have both the required references Microsoft.CSharp and System.Core in my project, but it refuses to recognize it. Using the integrated Visual Studio compiler works, however.

The offending line is:

dynamic obj = this.Engine.Operations.CreateInstance(pytype);


Never mind, it seemed that including the Microsoft.Scripting.Core assembly was the cause of this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜