LINQPad for macOS: First public preview!
The first public preview of LINQPad for macOS is now available:
https://www.linqpad.net/LINQPad8Mac.aspx
Keep in mind that not all features have yet been implemented.
Let me know your thoughts!
The first public preview of LINQPad for macOS is now available:
https://www.linqpad.net/LINQPad8Mac.aspx
Keep in mind that not all features have yet been implemented.
Let me know your thoughts!
Comments
So excited to try! No support on Intel Macs? Getting a "You can't open the application LINQPAd 8 beta.app because this application is not supported on this Mac.".
Hardware 2019 MacBook Pro 8-Core Intel Core i9
OS: 15.1.1
Have an M1 can try with later.
I'm so excited! I have to sleep, but I gave it a quick run, and I'm thrilled. Thanks for making this! (Mac mini M4 base model).
@naile: That's right, it's just Apple silicon for now. It would actually end up being quite expensive to support Intel - everything would need to be tested twice. And having a single deployment with multiple launchers like in Windows doesn't fit well with the macOS application model, so there would need to be two deployments and two automatic update streams for macOS (4 counting the betas). Then there's all the native dependencies which will be different, and the hardware intrinsics in LINQPad's debugger.
The dream has come true. Thanks, @JoeAlbahari. Since I started using Mac (2019), I've been waiting for this release. I updated my license this year because I had to work on a PC (I hated to go back to Windows) and I hoped I could continue using Mac. It's now official.
Just small question, do you think it is a environment problem or a bug on linqpad?
Does this happen when you execute all code? Can you post the stack traces for the outermost two exceptions?
I have installed the Preview version of LinqPad 8 on my mac. I am not able to open it. when clicking the launch icon no progress, no logs or errors over there, what to do now??
its Apple M3 Pro with macOS sequoia
This is the stacktrace:
I wrote small example so you can see it by yourself (the gdi.txt file is a linq script).
@Ekalaivan Have you installed .NET 8 or .NET 9? And can you run the 'Console' program on macOS to check for crash dumps?
@JoeAlbahari the console application works fine without any problem, i am able to see the output from terminal, working with net 8 x64 sdk. but still linqpad8 is not launching. tried reinstalling, it is asking for the confirmation of do i want to open the program downloaded from internet. After confirmation no response
the dump says
'''Failed to load /usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib, 0x0001): tried: '/usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib' (no such file), '/usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/x64/host/fxr/8.0.11/libhostfxr.dylib failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=2063366'''
@JoeAlbahari after installing NET 8 arm64 it is working fine. Thanks for the support
I hope when LINQPad for macOS is released, it would be possible to ship it for macOS INTEL x64.
Really excited about this!
Does cmd+click to go to definition work on mac? It doesn't seem to work for me
@yossizahn - thanks. This should now be fixed in 8.101.5
It is so fitting that LINQPad is the poster child for Avalonia XPF:
Works like a charm! It has already given me much value.
One thing I have not found yet; what is the shortcut keys for expanding/collapsing children?
On Windows it is ctrl-1, ctrl-2 etc, but I have not found the shortcut on mac, nor the setting for it. 🤔
Oh, never mind - found it! control-command-1,2,3, etc 😄
Perfect!
Most shortcuts that use the Alt key in LINQPad for Windows use Control-Command under macOS. You can change this to use the Option key in Settings/Keyboard - this is recommended if you don't use the Option key to generate special characters.
this is awesome!
on my first attempt to run this after installing the app it just gave a single bounce in my tray and nothing happened. I had to first run
launchctl setenv DOTNET_ROOT $DOTNET_ROOT
.other problem came while adding my nuget sources - my Teamcity feed uses negotiate auth but the "default credentials" option is missing here:
I tested with a nuget package that targets netstandard2.0 and depends on Microsoft.EntityFrameworkCore.SqlServer (3.1.18) and got an exception at runtime "TypeLoadException: Method 'Create' in type 'Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerSqlTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=3.1.18.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation."
..this is on sequoia 15.1.1 apple silicon, dotnet runtimes installed:
Microsoft.AspNetCore.App 9.0.0
Microsoft.NETCore.App 9.0.0
I tried adding LINQ-to-SQL Connection but no option for Kerberos auth.
looking forward to this build getting better!
LINQPad for macOS needs .NET 8 or .NET 9 to run - if this is not installed or improperly configured, the program will fail silently. This will eventually be fixed when I write a custom CLR host (as I have for Windows) - the custom host will display a helpful message in this scenario - but for now there's nothing I can do other than ship LINQPad as self-contained which would add considerable bloat.
Regarding your NuGet package source, what happens when you try the "Auto-detect" option?
Regarding Kerberos for SQL Server, are you able to use this authentication mode in other apps on macOS? And if so, it is it configured to work with a standard connection? You can test this by running the following script:
It works very well on M3 Max running Sonoma.
I got used to using System.Windows.Forms which does not exist to get like a file picker dialog. Anyone know of a Mac alternative?
..
I'm able to connect to sql server w/kerberos from other apps, pwsh and Azure Data Studio - usually "trusted_connection=yes" is enough. When I try from LINQPad 8 beta though I'm getting "The target principal name is incorrect. Cannot generate SSPI context."
LINQPad 8 beta does appear to be able to get kerberos tickets and use them, I'm able to grab that nuget feed for example:
when I choose the "Auto-Detect" option and save it just switches back to "Basic / none"
@gordy - thanks for the info.
I've just uploaded an automatic update. The NuGet settings dialog has a new option for "System Default Credentials" - can you please try this and let me know the outcome.
Regarding Kerberos authentication for SQL Server, I've added an option for this, too, although I suspect it will result in the same error when the application is run normally. If this is the case, can you try the following: Right-click on "LINQPad 8 beta.app" and choose 'Show Package Contents'. Navigate to Contents/macOS and double-click 'LINQPad8'. Let me know if that does anything to help the LINQ-to-SQL connection pick up the Kerberos settings.
auto update worked smoothly. my nuget source is working with the new "System default credentials" option. and I was able to add a LINQ-to-SQL connection w/kerberos and it works fine! I still get the "Cannot generate SSPI context." when trying to instantiate a Microsoft.Data.SqlClient.SqlConnection though.
I tried launching from Contents/macOS and got the same result. the LINQ-to-SQL connection works both ways.
thank you for adding this stuff!
So are you able to use the LINQ-to-SQL driver normally? Is there error only when you manually instantiate a SqlConnection?
the error is only when manually instantiating SqlConnection, I'm able to query the LINQ-to-SQL connection no problem
It sounds like there's something wrong with your connection string.
Try running the following script:
This will tell you the connection string that the driver is using.
I tried with the same exact connection string and got the same error - the problem seems to be with the nuget package, it is working with Microsoft.Data.SqlClient 6.0.0-preview3.24332.3
if I use version 5.2.2 then I always get the SSPI error
This is strange, because the LINQ-to-SQL driver uses version 5.2.1 of Microsoft.Data.SqlClient. If you right-click a table in LINQPad's Schema Explorer, and choose 'table.Take(100)', a new script will run that should reference that default version. You can verify this by pressing F4, Advanced, and 'Show Assembly Resolution Log'. Under Microsoft.Data.SqlClient, you should see 5.21.x as the version number.
If you see a different version, can you also right-click the connection itself and choose 'Show Assembly Resolution Log'?
if I use 5.2.1 from nuget I still get the SSPI error, but if I add a reference to "~/Library/Application Support/LINQPad/8.101.8/L2S/Microsoft.Data.SqlClient.dll" then it works (that's the path shown in the assembly resolution log)
After adding a reference to that specific file, do you see any difference in the assembly resolution log (versus the log when you add the NuGet reference?)