You need to enable the Microsoft.CSharp and System.Dynamic.Runtime packages for the aspnetcore50 framework.
This seems to work for me with CoreCLR version 1.0.0-beta1:
Newtonsoft.Json.Linq; ; DynamicTest { { public void Main ( [] args) { dynamic dobject = JObject.Parse( "{: 1000, : '', : [1,2,3,4,5,6]}" ); (dobject.number); (dobject.str); (dobject.array.Count); Console.ReadLine(); } } } >
Project .json
{ "": "1.0.0- *", "": { "Newtonsoft.Json": "6.0.7" }, "": { " " }, "": { "aspnet50": {}, "aspnetcore50": { "": { "System.Console": "4.0.0-beta-22231" , "System.Dynamic.Runtime": "4.0.0-beta-22231" , "Microsoft.CSharp": "4.0.0-beta-22231" } } } } >
Andersns
source share