A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred

13,147

The creator of JSON.Net himself addressed it here

Assuring that it's something minor and the exception is by design. More information on RuntimeBinderException has already been answered here on StackOverflow

By the way if you wish to disable these warnings just coz they make you uncomfortable.

In Visual Studio click on Tools - > Options and then select Debugging and Check the box that says Enable Just My Code.

Share:
13,147
Nikki Locke
Author by

Nikki Locke

I am a consultant/programmer working for my own company, currently mostly programming in C#, but with extensive experience in C++, SQL, C, Java, Basic, PHP and even 8086 Assembler (although I have forgotten most of that!). I also maintain the "Available C++ Libraries" FAQ, listing over 400 libraries for use with C++ (see my web page).

Updated on June 19, 2022

Comments

  • Nikki Locke
    Nikki Locke about 2 years

    When using dynamic on Newtonsoft JObjects, I get a lot of Microsoft.CSharp.RuntimeBinder.RuntimeBinderException in my debug output. Although the exceptions must be trapped somewhere in Microsoft.CSharp.dll, it makes me vaguely uncomfortable that they are occurring. Is there anything I can do to stop them (other than forgoing dynamic altogether)?

    Here is a short test program which outputs one of these exceptions:

        using System;
        using Newtonsoft.Json.Linq;
    
        namespace DynamicTest {
            class Program {
                static void Main(string[] args) {
                    JObject j = new JObject();
                    j["DocumentName"] = "Name";
                    dynamic d = j;
                    d.DocumentName = "Changed";
                }
            }
        }