Home

Dump is not working as expected

For example:

Or this:

I'm running LINQPad 5 v.5.44.02 premium edition on Windows 10. My "My Extensions" file is does not contain a ToDump method in case you're wondering.

Can you please assist?

Comments

  • Have you tried restarting? Can you reproduce this on another machine?

  • I've lived with this bug for a while, so yeah, I've restarted many times both app and machine. I've tested on one other machine. No problems there. I'm tempted to reinstall the app but I'm hesitant to loose configuration.
    My style sheet for text is also set to default just to add to the info.

  • Config is stored in %appdata%\LINQPad and %localappdata%\LINQPad

    You won't lose anything by re-installing. It might also help to re-install .NET Framework. Cleaning out the config might also be worth trying. Rename the LINQPad folders in %appdata% and %localappdata% to LINQPadx - that way, you can easily restore config if it doesn't help.

    • I renamed both appdata and localappdata folders.
    • I uninstalled LINQPad
    • Reinstalled
    • I checked if it worked before reinstalling .NET Framework and it did.
    • Went back and renamed back my original LINQPad folders
    • Error is back.

    Clearly there's something in there that's causing the error. I have kept the new install folders and reconfigured my connections and installed nugget packages. Here's a screenshot of the content of the local app data folder. If there's something in the that can be of use for you to debug this error, I'll be happy to send it.

    Thanks

  • You can identify the culprit fairly quickly with a binary chop. (Start by deleting or renaming half the files/folders). You can ignore the ones used only by LINQPad 6/7, i.e., 6.* 7.* DataContextCache.6*, NuGet.NetCore.*, WebView2 and Updates6*. Most folders are just for performance optimizations and LINQPad will rebuild if they're missing.

  • Hi Joe. This issue came back again after re-installing. Good news is I think I found the culprit using the method you suggested. It comes down to namespace imports. If a query has a namespace import, which all of mine had since I "set a default for new queries", the html based in Util don't work.

    Hope you can have a look at this. Many thanks

  • I did some further testing. I made the same test on another machine and the same behavior came up. However this doesn't seem to be an issue when I add a reference to any other namespace like System.IO or to other of my own dlls, only with our Core.Common. Could this be a naming conflict with another of the assemblies being used or something like that? (The naming of the dll is a bit misleading as it has nothing to do with dotnet core, it was simply the name chosen for our "core" library)

  • If you put the cursor over one of the methods you're calling, such as "WithStyle" and press F12, LINQPad will take you to the definition. Does it perhaps go to one of your classes in Core.Common?

  • edited June 2022

    Tried that. They all take me to the LINQPad assembly. There is not method with any of those names in Core.Common

  • Hi Joe, just wanted to say, I found the problem here. Turns out my colleague added an extension method with identical name and signature to the Core.Common library so that he could copy paste code from linqpad to VS without having to replace the calls to Dump...

  • No worries, thanks for the heads-up.

Sign In or Register to comment.