Home
Options

Cannot find LINQPad.UIExtensions.Dump

Attempted use Go to Definition on the Dump portion of the following line:

Image.FromFile("test.jpg").Dump(Util.ScaleMode.ResizeTo(300));

ILSpy comes up with the message

Cannot find 'M:LINQPad.UIExtensions.Dump``1(``0,LINQPad.Util.ScaleMode,System.String)' in command line specified assemblies.

Right-clicking on the statement indicates the owning assembly is LINQPad.Runtime.UI.dll. This assembly isn't automatically included in the ILSpy assembly list nor present in the LINQPad8 directory.

Context:

Basically, I was looking to save some rescaled images. I've got a routine in place to do the rescaling, but I wanted to make sure I wasn't missing anything in getting this done and figured the Dump code would be a good reference.

Comments

  • Options
    edited November 2023

    It is extracted into a subfolder located in %localappdata%\LINQPad\ with the name of the subfolder being the version number (eg 8.0.17).

    If you want to automate it a bit you can run

    var version = Uncapsulate("LINQPad.Settings", "LINQPad.Runtime").VersionString;
    
    var localappdata = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
    
    Util.OpenILSpy(
        typeof(LINQPad.UIExtensions), 
        $@"{localappdata}\LINQPad\{version}\LINQPad.Runtime.UI.dll");
    
Sign In or Register to comment.