首页 > 代码库 > One or more types required to compile a dynamic expression cannot be found.

One or more types required to compile a dynamic expression cannot be found.

This is because dynamic keyword is a new C# keyword. So we need to import Microsoft.CSharp.dll.

Here is offical document: http://msdn.microsoft.com/en-us/library/dd264736.aspx  the very first sentence:

"

Visual C# 2010 introduces a new type, dynamic. 

"

C# example:

dynamic d1 = 7;dynamic d2 = "a string";dynamic d3 = System.DateTime.Today;dynamic d4 = System.Diagnostics.Process.GetProcesses();

One or more types required to compile a dynamic expression cannot be found.