Download LINQPad 7

LINQPad 7 supports C# 10 and targets .NET 6, .NET 5 and .NET Core 3.1.
(For .NET Framework support, run LINQPad 5 side-by-side.)

Download LINQPad 7 - RTM

Download LINQPad 7 - Latest Beta

See beta release notes

X64 + X86 + ARM64 (Windows)

Release Notes

To enable the Pro/Developer/Premium features of LINQPad 7, you will need to upgrade your license to Version 7 (unless you purchased recently.) A LINQPad 7 license works for all older versions of LINQPad, too.

LINQPad 7.3

New Features

  • Queries can now target the .NET 7.0 preview. The EF Core drivers have also been updated to support the EF Core 7 preview.
  • You can now play with the latest experimental C# 11 features: go to Edit | Preferences > Query and enable Use C# Preview Features and Use Roslyn Daily build.
  • You can now define a static ToDump method in any query (not just in My Extensions). This also includes queries that you #load: each can have its own static ToDump method.
  • You can now call Util.WithStyle on numeric values without losing right-aligned formatting and automatic graphing in tables. There's also a new Util.WithCssClass method to specify a CSS class.
  • The maximum editable length for text fields in SQL databases (when editing data interactively) has been increased to 60,000 characters.
  • The NuGet Package Manager Source Settings dialog now lets you specify an authentication type. Specifying Basic forces basic authentication, which improves reliability when connecting to Azure Devops feeds with a Personal Access Token. There's also a new option to use default Windows credentials.
  • The Find dialog now works with SQL translation text, too. Just focus the control and use the standard menu options or shortcut keys (Ctrl+F, F3, Shift+F3 and Ctrl+I).

Fixes

  • A memory leak when working with F# queries has been fixed.
  • An error when generating typed data contexts that include C# keywords - for users in countries with non-English A-Z letter ordering - has been fixed.
  • LINQPad has been hardened against intermittent errors in the WebView2 (Edge Chromium) engine.
  • A bug where DumpContainers and Tasks sometimes failed to update in inactive queries has been fixed.
  • A race condition in Util.HtmlHead.AddScriptFromUri that could result in empty output has been fixed.
  • The LINQ-to-SQL connection option to include system objects now works with the master database as well.
  • Grouped observables with compound keys now display correctly when dumped.
  • A focus management issue with the latest WebView2 results rendering engine has been fixed.
LINQPad 7.2

New Features

  • LINQPad now actively monitors NuGet package references and dependencies for published vulnerabilities and gives warnings - both when choosing packages and executing queries. You can suppress warnings for specific (or all) packages in Edit | Preferences > Advanced > Execution. Packages whose content will be overridden by the runtime or another package are automatically ignored.
  • There are two new methods in the Util class to shape data before dumping. Util.Pivot swaps rows and columns before dumping sequences and objects (and 2-dimensional arrays):
    Util.Pivot (allCustomers).Dump();
    Util.Pivot (myCustomer).Dump();
    Util.Merge merges the properties of two or more objects into one. It's particularly handy when you want to add extra columns to the output of a LINQ query:
    from il in InvoiceLines
       select Util.Merge (
          il,
          new { il.Invoice.InvoiceDate, il.Track.Composer });   // Adds two columns to the InvoiceLine object
    
    Refer to LINQPad's help (Ctrl+F1) for more examples.
  • There's now an Image HTML control in the LINQPad.Controls namespace. This supports the same image source and scaling options as Util.Image, so you can pass in a URI, filename, System.Drawing.Image, or byte array.

Fixes

  • F# queries that use the FSharp.Data NuGet package should now work correctly.
  • A condition that could cause an assertion failure when using the LINQ-to-SQL driver has been fixed.
  • An ASP.NET assembly resolution error that appeared when connecting to your own assemblies in the EF Core dialog has been fixed.
  • The command-line runner now returns 1 if a script fails. You can also return a non-zero value to LPRun7 by returning an int in the Main method - or by setting Environment.ExitCode.
  • Completed tasks now honor the ToDump pipeline.
  • DateOnly and TimeOnly types can now be used as primary keys in LINQPad's LINQ-to-SQL implementation.
  • LINQPad can now reliably locate the reference assemblies in the .NET 6.0.1 SDK, avoiding the prompt for a NuGet download.
  • String concatenation now works correctly in LINQPad's Watch debugger window.
  • LINQPad's editor now recognizes the unmanaged and notnull type constraints in syntax highlighting.
  • LINQPad's Locals and Watch debug windows now correctly expose lambda-captured variables in asynchronous functions.
LINQPad 7.1

New Features

  • LINQPad 7 now supports F# 6.
  • Connections configured for .NET 6.0 now always use the requested framework if available, regardless of your default framework choice. This avoids compilation errors that might otherwise result.
  • Util.Dif's text diffing is now more aggressive in looking for differences when comparing single-line strings.
  • The MySQL and PostgreSQL drivers have been updated to .NET 6.0.
  • When dumping structs, LINQPad now descends into fixed-length buffers.

Fixes

  • The CMD symbol now works correctly when running scripts with LPRun7.
  • Queries with the "Reference LINQ-to-SQL" checkbox enabled should now work with the right assemblies.
  • When dumping a DataTable in DataGrid mode, an icon now appears when a RowError property is set.
  • A startup error that was affecting some users has been fixed.
  • A number of edge-cases that could cause the auto-generated LINQ-to-SQL data context not to compile have been fixed.
  • A package restoration error that sometimes appeared when enabling spatial types in the EF Core dialog has been fixed.
  • If .NET 6 hasn't been installed, EF Core connections will use EF Core 5 instead of EF Core 6.
  • An intermittent error that sometimes appeared when restoring NuGet packages from a local source has been fixed.
LINQPad 7

Deployment

LINQPad 7 requires at least one of the following runtimes:

  • .NET 6 (Desktop) - RC1 or later
  • .NET 5 (Desktop)
  • .NET 3.1 (Desktop)

If none of these have been installed, LINQPad will bootstrap the installation of .NET 6. If multiple runtimes have been installed, you can choose which to use on a per-query basis via a dropdown in the toolbar. (You can also set a global default in Edit | Preferences.)

.NET Core 3.0 is no longer supported.

The xcopy-deployable version of LINQPad 7 ships with the following launchers:

LINQPad7-x64.exe    // for X64
LINQPad7-x86.exe    // for X86 - choose this if you need to reference native 32-bit DLLs
LINQPad7-arm64.exe  // for ARM64 machines such as Surface Pro X

It is recommended that you rename/copy the launcher that corresponds to your native platform to LINQPad7.exe.

LINQPad's launchers are custom CLR hosts. This allows them to bind the host to the optimum .NET version, and bootstrap the installation of .NET if no suitable version has been installed.

Launchers for Command-Line Support

LINQPad also ships with special new launchers for executing queries via the command-line:

LPRun7-x64.exe    // X64
LPRun7-x86.exe    // X86
LPRun7-arm64.exe  // ARM64

It is recommended that you rename/copy the launcher that corresponds to your native platform to LPRun7.exe (the RTM installer will do this for you automatically).

These are also custom CLR hosts and include logic on the unmanaged side to determine which .NET version to spin up (new to LINQPad 7). Instead of looking for a .runtimeconfig.json file, the command-line launchers locate and examine the .linq query that you want to run. If you chose a specific .NET version in the toolbar when you wrote the query, this will have been saved to the .linq file, and this choice will be honored. Otherwise the launcher parses the user-preferences file for your default framework choice.

You can also specify/override the .NET version with LPRun7's -fx switch:

LPRun7 -fx=6.0 (query-to-run)   // Run query under .NET 6.0
LPRun7 -fx=5.0 (query-to-run)   // Run query under .NET 5.0
LPRun7 -fx=3.1 (query-to-run)   // Run query under .NET 3.1

ARM64 Support

LINQPad 7 natively supports the Windows ARM64 platform, for an optimized development experience on ARM64 laptops. This includes LINQPad's debugger, which has been fully updated with ARM64 offsets and registers, so you can debug scripts just as you would on X64/X86 machines.

EF Core 6.0

LINQPad 7 supports Entity Framework Core 6.0 (as well as older versions, down to 3.0). LINQPad's EF Core driver understands the compatibility matrix between versions/subversions of .NET and EF Core, and if necessary, will switch your query to the closest compatible .NET version (with a warning).

LINQPad 7's EF Core drivers no longer support EF Core 2.x - the minimum supported version is now EF Core 3.

DateOnly and TimeOnly Types

.NET 6 includes DateOnly and TimeOnly types to represent just a date or time. In LINQPad 7, you can control the default fomatting for these new types in Edit | Preferences > Results.

Additionally, LINQPad's internal implementation of LINQ-to-SQL has been updated to support DateOnly and TimeOnly, so you can now have a perfect mapping for SQL Server's date and time types. To ensure backward compatiblity, this feature is disabled on existing connections by default; to enable, tick the checkbox in the connection properties dialog. (This feature is also disabled if you haven't installed .NET 6+.) You can use properties of DateOnly and TimeOnly (such as Year, Month, Hour, Minute, etc.) in LINQ-to-SQL queries and these will be translated into SQL. LINQPad's LINQ-to-SQL also includes an extension method on DateTime called DateOnly() to extract the DateOnly portion - this helps in scenarios such as comparing a DateOnly column with a DateTime column.

Support for DateTime and TimeOnly in EF Core will arrive when this feature has been implemented by the EF Core team.

Util.Dif

LINQPad 7's Util.Dif function now has a more powerful diffing engine that can descend into strings and identify insertions/deletions in scalar-typed lists. This helps in scenarios such as regression testing, where you want to compare the output from old and new algorithms. When strings are compared, a full text-diffing library is employed to show insertions and deletions:

Util.Dif ("The quick brown fox jumps over the lazy dog.",
          "The quick brown fox *jumps* over the lazy dog").Dump();
The quick brown fox jumps*jumps* over the lazy dog.

LINQPad first applies a series of heuristics to determine whether to use word- or line-based chunking, allowing the comparison to be useful in a variety of scenarios without manual input.

JSON support

JsonDocument or JsonNode now render as syntax-highlighted JSON when dumped. Calling Dump(true) results in the JSON being displayed in a separate output panel with an outlining editor (as with XDocument). If you prefer to see the object structure with a JsonNode, you can do so by calling DumpRaw() instead of Dump(). LINQPad also lets you open .json files directly in the editor, with a toolbar option to format the document.

Running LINQPad versions side-by-side

For .NET Framework support, you can continue to run LINQPad 5 side-by-side with LINQPad 7. (You can also run LINQPad 6 side-by-side, although there is little benefit unless you still need to support .NET 3.0 or EF Core 2.x.)

Here are some tips to help you with sharing queries between LINQPad 5 and LINQPad 7:

  • Any .NET Framework assembly references are ignored in LINQPad 7.
  • Other assembly references may cause difficulties unless they are to .NET Standard libraries. NuGet package references are the best option.
  • For conditional compilation, the NETCORE symbol is defined in LINQPad 7 but not LINQPad 5.
  • My Extensions is separate for LINQPad 5 and 7, so each can have different implementations and dependencies. As long as you provide textually similar methods in both, queries will work with both.

LINQPad 7 - Latest Beta

New Features

  • You can now edit credentials in the NuGet Package Manager Source Settings dialog without needing to restart LINQPad.

Fixes

  • Util.Pivot now works correctly when expanded from a hyperlink.
  • The tooltips for null-valued booleans now display correctly in data grids.
  • The .NET downloader utility now works with default proxies.
  • DateOnly and TimeOnly types can now be used as primary keys in LINQPad's LINQ-to-SQL implementation.
  • LINQPad's editor now performs well when #loading large Program-type queries.
Download LINQPad 7 Beta

Current beta version: 7.4.2

LINQPad 7 betas automatically update when a newer beta is released.

(Scroll up for release versions)