LINQPad 6 for .NET Core 3 - preview now available!

An early preview of LINQPad for .NET Core 3 Desktop is now available for download:
https://www.linqpad.net/LINQPad6.aspx

In addition to targeting .NET Core 3, there are a bunch of new features:
  • You can now add references to other .linq files, via the the new #load directive.
  • The extensibility model for writing custom data context drivers has been updated for LINQPad 6.
    Creating a project is now as simple as running a LINQPad script, and publishing it is as simple as publishing a NuGet package.
  • When executing a selection in 'C# Program' mode, the selected text can now call other methods in the query.
  • The 'Go to definition' shortcut (F12) now works for symbols defined in My Extensions (as well as #load-ed queries).
  • Outlining now works in statements mode, too, if you have #regions or methods defined.
  • If you hold down the control key anywhere in the editor, it will display the quick-info tooltip, as well as any errors or warnings on that line.
  • If you type /// before a member, LINQPad will now expand it into a simple (one-line) XML summary. These summaries are picked up from #load-ed queries, as well as My Extensions.
  • The back-end for the NuGet Package Manager has been re-written to be faster and more reliable. It now works directly from the local user cache,
    and recognizes reference assemblies and native dependencies in line with .NET Core protocols.
    When restoring packages, LINQPad 6 searches all enabled package sources.
  • Queries now automatically re-loaded when the file is changed externally.
  • When calling file-based methods such as File.Open, the editor now offers autocompletion on the file path.
  • There are new options available when calling Dump - to suppress column totals, control repeating headers, and specify a depth at which to initially collapse the results.
  • When compiling your queries, LINQPad 6 preferences reference assemblies over runtime assemblies. If the reference assemblies for the current
    .NET Core runtime version have not been installed, LINQPad will offer to download the appropriate NuGet package.
  • LINQPad 6 supports soft cancellation. By monitoring this.QueryCancelToken, your query can respond to the Cancel button, and
    elect to end early without the underlying process being killed.
  • You can now connect to SQL CE databases without installing SQL CE. LINQPad will automatically download the NuGet package as required.
«1

Comments

  • edited June 13

    Wondering why .NET Core 3.0-preview5-27626-15 is recommanded while preview6 is required to run LINQPad 6?
  • Well spotted. The Microsoft.netcore.app NuGet package for preview6 is curiously missing its reference assemblies, making it useless. So I've had to include a hack in LINQPad to make it download the preview5 package instead.

    This shouldn't make much difference because it's only reference assemblies. Your queries will still target the preview6 runtime assemblies.
  • edited June 13
    BUG? It doesn't show ef tracing sql


    or it just license problem?

    it can show in linqpad 5 free

  • Thanks - will fix shortly.
  • edited June 14
    I have some feedback about the LINQPad6's shortcut:

    1. Menu shortcut, press Alt+F, then press "X", will(should) close LINQPad, but it seems not functional:

    2. I like the LINQPad5's right click syntax and press "G" to Go to Definition(instead of press F12), but the "G" shortcut seems missing in LINQPad6.


    3. I have tons of LINQPad query, by clicking the Go to..., I can quickly navigate to the .linq file I searched. I'd like to have a shortcut to search quickly like "Alt+T" for "Control+Shift+P", so I can leave my mouse and have fun with the keyboard :smile:


  • The issue with keyboard accelerators is a bug in .NET Core 3 which is scheduled to be fixed in August:
    https://github.com/dotnet/winforms/issues/1021

    The shortcut for 'Go to' is the same as in Visual studio (Ctrl+comma).

    (Once the 'Go to' dialog is open, you'll notice a couple of new shortcuts - click the down-arrow next to the OK button to see them.)
  • edited June 14
    For some reason(I don't know), Ctrl+comma is not work for me in both LINQPad5 and LINQPad6, can I change the shortcut or is there any known particular reason causing it not working?
  • edited June 14
    Another some bugs I seem in LINQPad6:
    1. Open a .linq file with "#LINQPad optimize+" with comment will always break the lexer(code highlight):

    Note:
    * Comment is required to reproduce this issue, without comment everything is fine
    * Open a existing file is required, when I just typing the code, I cannot reproduce the issue.

    2. When I open a new LINQPad6 process and then first time trying to open Nuget package manager UI, will always show a error message:

    The Chinese text is: 对类型"System.Windows.Controls.TextBox"的构造函数执行符合指定的绑定约束的调用时引发了异常。(in case you can translate it in Google :smile:
    After that, close the error dialog and open the nuget package manager UI again, everything is fine.
  • edited June 14
    Another bug I found in LINQPad NuGet Manager(UI):
    The TextBox to search local NuGet package and TextBox in search global NuGet package, cannot use any shortcut, any shortcut I mean I cannot Cut(Ctrl+X)/Copy(Ctrl+C)/Paste(Ctrl+V), cannot select All(Ctrl+A), cannot click Backspace, Cannot click Del. The only thing I can(thanksfully :smile: ), is typing.



    And When I select all(by mouse) and right click on the text, The Cut/Copy/Paste option are all grayed out:

    I guess this issue maybe related to previous error for XamlParseException.
  • Yes, it might be related, because cut/paste works for me. From the stacktrace, it looks like a .NET Core 3 issue. I'll wait until I get more data (hopefully we'll get similar error reports from other users) and then file a bug report.
  • edited June 14
    How about the previous (lexer)code highlight issue?
  • Just a note on the auto-update functionality in LINQPad 6: I found that auto-update fails if you don't have the .NET Core 3 x86 SDK installed (I only had the x64 version installed). It complains about not being able to find hostfxr.dll. Installing the x86 SDK fixed the problem.
  • Yes, that's exactly what's happening. I'll have to either ship updaters for both X64 and X86 or use .NET Framework for this.
  • edited June 23
    Are there any "Samples for .Net Core" to be downloaded from Linqpad servers ? ( just like in v4 & v5) ?

    It would be very nice to see basic snippets of .net core , just like in other linqpad versions.


  • I've found another issue, this time with .NET Standard 2.1 assemblies. When I add a NuGet package that only targets .NET Standard 2.1 (e.g. Grpc.Net.Client 0.1.22-pre1), LINQPad complains that "No usable assemblies were found in [the package]".
  • Royi - what samples are you referring to in LINQPad 5?

    wazzamatazz - thanks for reporting. There may not be a fix for this until MS release a full .NET Core NuGet stack. Right now, NuGet.PackageManagement is .NET Framework only and so LINQPad 6 must use an unofficial netstandard port which hasn't been updated since December last year.
  • Right now, NuGet.PackageManagement is .NET Framework only and so LINQPad 6 must use an unofficial netstandard port which hasn't been updated since December last year.

    That's a really interesting problem that I hadn't thought about. All of the dependencies for NuGet.PackageManagement are .NET Standard 2.0-compatible, so would be interesting to know why the package itself is .NET Framework only.
  • Right now, NuGet.PackageManagement is .NET Framework only and so LINQPad 6 must use an unofficial netstandard port which hasn't been updated since December last year.

    That's a really interesting problem that I hadn't thought about. All of the dependencies for NuGet.PackageManagement are .NET Standard 2.0-compatible, so would be interesting to know why the package itself is .NET Framework only.
    Had a quick scan through the NuGet issues on GitHub and it seems like the main reason that NuGet.PackageManagement is Framework-only is because of its dependency on Microsoft.Web.Xdt (see here for example). However, Microsoft.Web.Xdt introduced .NET Standard 2.0 support in v3.0.0, so it might be possible to build from source and target .NET Standard 2.0? I'm happy to be a guinea pig if required!

  • sdflysha said:

    Another some bugs I seem in LINQPad6:
    1. Open a .linq file with "#LINQPad optimize+" with comment will always break the lexer(code highlight):

    Note:
    * Comment is required to reproduce this issue, without comment everything is fine
    * Open a existing file is required, when I just typing the code, I cannot reproduce the issue.

    2. When I open a new LINQPad6 process and then first time trying to open Nuget package manager UI, will always show a error message:

    The Chinese text is: 对类型"System.Windows.Controls.TextBox"的构造函数执行符合指定的绑定约束的调用时引发了异常。(in case you can translate it in Google :smile:
    After that, close the error dialog and open the nuget package manager UI again, everything is fine.

    After some investigation, I found that this issue don't not occur in English(United States) language. So it is a localization issue.
  • Thanks. I'll investigate these further and let you know if I need more information.
  • The database dropdown in LP5 shows the server and database name but on LP6 it just shows the database name which doesn't work for me as the database servers all have the same databases in each environment, dev, test, stage or production.
  • LordH - thanks for reporting - this will be fixed in the next build.
  • sdflysha: the localization issue is caused by https://github.com/dotnet/wpf/issues/1178

    I'll include a workaround in tomorrow's build which will reset the culture to US if you're running netcore 3 preview6.

    Tomorrow's build will also include a fix for the syntax parsing issue.
  • wazzamatazz - I've created a custom netstandard compilation for NuGet.PackageManagement, which should hopefully make tomorrow's build.
  • Royi - what samples are you referring to in LINQPad 5?

    wazzamatazz - thanks for reporting. There may not be a fix for this until MS release a full .NET Core NuGet stack. Right now, NuGet.PackageManagement is .NET Framework only and so LINQPad 6 must use an unofficial netstandard port which hasn't been updated since December last year.

    To those samples :

    Maybe .Net core samples ?


  • The built-in samples should all be present and (almost all) should work in LINQPad 6. If you find any errors, please report on a separate thread.

    "C# 7 in a Nutshell" will be replaced with "C# 8 in a Nutshell" in time.

    With the third-party downloadable samples, a few may have .NET Framework dependencies - it's up to the author to update these to netcore 3.
  • My LINQPad 6 beta just updated itself to v6.0.11 and now every time I run a query I get a message that says, "The connection for this query relies on...EF7Driver". If I hit, "Yes", a window comes up but there are no drivers available to download. If I hit, "No", the query executes just fine.

    Thanks for the help. Also, absolutely fantastic product!

    -Scott
  • wazzamatazz - I've created a custom netstandard compilation for NuGet.PackageManagement, which should hopefully make tomorrow's build.

    Brilliant, thanks. Will try it out and let you know how I get on!
  • wazzamatazz - I've created a custom netstandard compilation for NuGet.PackageManagement, which should hopefully make tomorrow's build.

    Brilliant, thanks. Will try it out and let you know how I get on!
    Okay, first off, LINQPad now recognises that it can use the .NET Standard 2.1 library for Grpc.Net.Client v0.1.22-pre1, which is great, thanks! There seems to be a new bug though, which is that LINQPad isn't recognising the package dependencies that Grpc.Net.Client has.

    LINQPad:


    Actual (via NuGet Package Explorer):


    As a result, I have to manually add the dependencies myself before I can run a query (obviously not a big hardship).
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!