Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeBinderException when accessing dynamic object properties in version 6.0.4.17603 #352

Closed
alexander-w opened this issue Aug 19, 2014 · 2 comments

Comments

@alexander-w
Copy link

A RuntimeBinderException is thrown when accessing dynamic object properties, depending on visual studio settings.

Steps to reproduce:

  1. Create a new winforms or console application and add Json.NET via Nuget
  2. Go to debug> Exceptions and tick 'CLR exceptions'

put this code in Main() or wherever and run.

dynamic jsonResponse = JsonConvert.DeserializeObject("{\"message\":\"Hi\"}");
  Console.WriteLine(jsonResponse.message); 

^^^Exception thrown here

@alexander-w alexander-w changed the title RuntimeBinderException when accessing dynamic object properties RuntimeBinderException when accessing dynamic object properties in version 6.0.4.17603 Aug 19, 2014
@JamesNK
Copy link
Owner

JamesNK commented Aug 20, 2014

Apparently that's just how dynamic works - http://stackoverflow.com/questions/15016561/runtimebinderexception-when-using-dynamic-object

@lprichar
Copy link

lprichar commented Dec 3, 2020

:) thanks @JamesNK. For posterity: in other words if you're debugging with break on all exceptions turn on, turn it off for RuntimeBinderException and your program will continue running just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants