Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I work on an windows phone 7.1 app on Visual Studio 2010. I try to do that:

dynamic dyn = JsonConvert.DeserializeObject(json);
MessageBox.Show(dyn.somevar);

I have this error:

One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?

I tried to add C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\Microsof.CSharp.dll but it doesn't work.

What can I do now?

like image 537
flow Avatar asked Oct 21 '22 08:10

flow


1 Answers

Dynamic keyword requires .Net Framework 4.0. (and DLR). Windows Phone 7 (and 8) has it's own version of .Net Framework. And dynamic language runtime is not included.

So, you can't use it for Windows Phone development.

like image 111
Anton Sizikov Avatar answered Nov 03 '22 00:11

Anton Sizikov