Search code examples
c#xnamonogame

error CS0103: The name 'DebugDisplayString' does not exist in the current context


While debugging through a Monogame program I was noticing some weird behaviors in my code.

Whenever I hovered over a XNA Point, I would get the following error instead of seeing the value of the XNA Point.

error CS0103: The name 'DebugDisplayString' does not exist in the current context

Visual Debug

I printed the value of the point via the ToString(), and the result was empty AKA "".

Here is my test that I showed in the screenshot:

    static void Main(string[] args)
    {
        Point point = new Point(3, 1);
    }

This started to happen recently. Any ideas?


Solution

  • This happens when you're referencing the PCL version of MonoGame.

    The reason is that the PCL uses the bait and switch technique so the DLL doesn't actually contain an implementation.