Options
LINQPad 9 - Early Preview now available
LINQPad 9 is major update that unifies the Windows and macOS codebases, more than a year in the making. For Windows users, there's a major UI refresh, including a brand-new dark theme, customizable keyboard shortcuts, connection grouping and more. While the planned RTM date is November, an early preview is now available:
https://www.linqpad.net/linqpad9.aspx
Let me know your thoughts!
Comments
I love the switch to a new editor. The previous one was showing it's age, especially when searching through the file. Is it the same one VSCode uses? Even has a splitter
It uses Actipro's WPF SyntaxEditor, with some tweaks.
The entire codebase is now WPF/XPF.
Cool! Looks like it's missing the indent guides. Would be great if we had an option to show whitespace characters or had better multiple cursor support (if possible).
Ran into a few issues.
Firstly - ILSpy does not work.
Util.OpenILSpy(this); briefly displays a "working" message then continues without opening ILSpy
Both F12 and Query.Reflect script in Ilspy throw an NullException error Value cannot be null. (Parameter 'stream')
Secondly: Can't Reference System.Data.Linq.DataContext
I have a very commonly used extension method in My Extensions with the signature
System.Data.Linq.DataContext is in %localappdata%\LINQPad\8.9.4\L2S\net6.0\SD.Tools.LinqToSQL2.dll which is included in LP8 if I select 'Include Linq-to-sql' assemblies, but the new version is not included in LP9.
Any ideas how to resolve this?
Thanks - these issues should now be fixed.
Thanks.
ILspy is now working correctly.
I can reference `System.Data.Linq.DataContext in any script as long as it has a Linq2Sql data connection, but I can't add a connection to 'My Extensions.linq' and hence my extension method does not work.
I have got a workaround by cloning "My Extension.Linq" and then adding a dummy connection to the clone and then any script that uses the extension method I can disable "My Extensions" and manually load my cloned copy.
@sgmoore Sorry - this is indeed still not working. I've added a fix to the latest update, although it's not quite perfect. It's unable to resolve the assembly for spatial types. I'm not sure whether this will be an issue in practice. It's not possible to fix without having another checkbox to indicate whether you want to use System.Data.SqlClient or Microsoft.Data.SqlClient.
Thanks, my extension now works correctly in 9.0.6
I noticed another change which I am not sure is deliberate or not.
With 9.0.6 autosaved files are now stored in
%localappdata%\LINQPad\Sessions\LINQPad8
With 9.0.5 they were stored in
%localappdata%\LINQPad\Sessions\LINQPad9
Yes, this is deliberate. The format is compatible between LINQPad 8 and 9, so having separate folders only increases the chance of having to deal with merge conflicts should you run both versions.
For the final v9 release, will they be separated back?
I don't mind sharing the state between the versions at this stage, but I would want to keep the sessions separate in the end. I did have some throwaway scripts open prior but would hate to lose them unexpectedly.
Hi, @JoeAlbahari
Open a script from
My Scripts
and execute it. I cannot reopen it after closing the script. See the GIF below.On macOS 15.5, LINQPad 9 auto detected/registered my key.
On Windows 10 Pro, LINQPad 9 required me to manually enter my license.
@JeffMercado Keeping the sessions separate makes it much easier to create conflicts. Let's say you edit a script in LINQPad 8 and then quit. Then later you run LINQPad 9 and open the same script. The old version will come up, without the edits you made in LINQPad 8. Are you OK with this?
DualXraY - thanks. This will be fixed in the next build.
I guess ultimately I was jus thinking of how things were separate between major versions and won't matter much to me. I will be moving on to 9 and not be turning back. Just worry about the new extension syntax potentially breaking 8 if one were to keep it around. I will be rewriting all of my extensions using the new syntax.
That's right - C# 14 features will not compile on earlier tools, including LINQPad 8 and LINQPad 5.
Not actually a LP9 issue, but Util.CurrentScriptPath and Util.MyScriptsFolder have been added to LP8 to help with LP9 compatibility, but it looks like there is a copy paste issue with the latter.
public static string CurrentScriptPath => CurrentQueryPath;
public static string MyScriptsFolder => CurrentQueryPath;
Good spot, thanks.
Hi Joe,
I know it’s a bit early, but I wanted to bring to your attention an issue I’m experiencing with LINQPad 9. On macOS 26 beta, every time I try to execute a query, I get the LINQPad.ExecutionModel.ProcessCreationException. Interestingly, I’m having the same issue with LINQPad 8.
Thanks for the great tool.
Util.FixedFont doesn't work with arrays in LP9.
Example
Screenshots in LP9 and LP8 where it works correctly.

Works for single lines as shown by the last two lines.
@dindjarin - thanks for reporting. This error report has been coming in intermittently for a while now - I believe it's related to issues with the Posix semaphore implementation in macOS. Use of this semaphore has been switched off entirely in the 9.1.1 build, so if this is the case, the problem should go away. Let me know how you get along.
@sgmoore - thanks - this should be fixed in 9.1.1.
An error is raised when sharing a script in 9.1.2. When pressing 'OK' to dismiss the dialog after sharing, InvalidOperationException.
Yes - I also noticed that just recently. It should be fixed soon.
I have noticed a few more minor glitches, but at the moment I am only reporting the ones that I can reproduce.
Goto Definition
If I use F12 (or Goto Defintion) on a method that exists inside a #region block in 'My Extensions' and 'My Extensions.linq' is not already open in LP, then it looks like the editor opens and jumps to the method correctly but then the regions are collapsed leaving the cursor at top of the region rather than positioned on the method.
Opening linq files from windows explorer.
If I have .linq files registered to open with LP9 then the script will only be opened if LP9 is not already running.
Goto Definition in ILSpy
To reproduce, open a brand new LP9 session and create a script like
If I right-click on List then the menu option shows "Goto Definition" (without saying where List is found)
If I cancel the menu and right click on .LINQPadFolder, it shows "Goto Definition in ILSpy (in System.Collections.dll)"
System.Collections.dll is where List is located and so it looks like it displays the location of the previous lookup.
If I continue, then the method is opened correctly in IlSpy.
Also, I haven't come across this particular issue for real, but with this test, if I proceed with the first attempt (on list) Ilspy crashes.
Currently using V9.1.2
As an aside, this is not a new issue, but I always wondered why you can't F12 on certain things like Dump?
Hello, when querying the db using SQL,
Syntax
tab is visible and clicking on it causes NREHi. LINQPad 9 is looking great, no issues so far from my usage. One feature I do miss is support for multiple cursors, similar to what Visual Studio offers, such as selecting the previous/next occurrence or selecting all occurrences of the current selection.
Are there any plans to add this?
@sgmoore - thanks. These issues should now be fixed. The reason you can't F12 on Dump is because when automatic headings are selected, your call to Dump goes via hidden intermediate code in your script. The fix for this is not easy.
@romfir - thanks - this is now fixed.
@PedroSantos - you're in luck! This feature is relatively easy to implement with the new editor. Try the new 9.1.3 build and let me know.
That is great news for the non vim guys
. The select next occurrence is working as expected. Thanks @JoeAlbahari .