Is it possible to run LINQPad with Mono (Mac)
Asked Answered
W

4

35

I have installed Mono 2.6.7 in Snow Leopard and would like to run LINQPad. I've gotten LINQPad (v2.21) to start but immediately get a FileNotFoundException. Has anyone been able to run it successfully?

I assume the exception is because it's trying to read/write a config file or something but hopefully there is some workaround.

Thanks.

Edit: Building Mono with "Olive" (required for WPF):

In Terminal:

svn co svn://anonsvn.mono-project.com/source/trunk/olive
cd /Users/(your user name)/olive
./configure --prefix=/Users/(your user name)/olive --with-glib=embedded
make
make install

Now navigate in Finder to:

/Users/(your user name)/olive/lib/mono/gac

Copy those folders (ex: PresentationCore, PresentationFramework) into:

/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/gac (Current Mono version is 2.6.7 but this obviously may be different)

Edit: Unfortunately, now I'm getting this when running LINQPad:

WARNING **: The class System.Windows.Resources.AssemblyAssociatedContentFileAttribute could not be loaded, used in LINQPadcould not be loaded, used in LINQPad

Edit: Xamarin Workbooks recently released 1.0 (https://developer.xamarin.com/workbooks/) and is the closest I've seen to LINQPad on macOS.

Edit (September 2017): This is still speculative!

Running most Windows applications (including GUI apps) might be possible with Docker and Windows Subsystem for Linux (WSL):

Animated demo of cmd.exe running on Ubuntu

See the blog post at https://blog.jessfraz.com/post/windows-for-linux-nerds/ for a detailed walkthrough.

Wildebeest answered 10/9, 2010 at 2:36 Comment(6)
Can you get the exceptions details? If so print them here.Tremendous
I see in Terminal some more info:Wildebeest
** (/Users/ifwdev/Downloads/LINQPad.exe:1775): WARNING **: The following assembly referenced from /Users/ifwdev/Downloads/LINQPad.exe could not be loaded: Assembly: PresentationCore (assemblyref_index=11) Version: 3.0.0.0 Public Key: 31bf3856ad364e35Wildebeest
This means that it need the WPF assembly PresentationCore - is there a mono equivalentTremendous
Ah, maybe if I read directions better. I need "Olive" which is not included with mono by default.Wildebeest
It seems to me that this question has become more relevant with age!Wildebeest
T
38

LINQPad doesn't work in Mono primarily because it relies on ActiPro's SyntaxEditor which does some Win32 interop. LINQPad itself also does some interop.

An early prototype of LINQPad used a TextBox instead of a syntax editor - this might be what was tested against Mono.

Thereabout answered 10/9, 2010 at 4:14 Comment(7)
Well I guess you'd know better than anyone. At least I learned a bit about Mono anyway. Thanks Joe...Wildebeest
Joe: Do you think an older version might work? (see Justin's comment)Wildebeest
Yes - I expect a VERY old version would work (0.9x). Unfortunately, I no longer has this version on file.Thereabout
Update: I've tracked down an old copy of LINQPad (0.92) and uploaded it here: www.linqpad.net/LINQPad092.zip. Ensure you run it via the shortcut (which calls LINQPad with the -noupdate and -noforward switches), otherwise LINQPad will patch itself to the latest version.Thereabout
@JoeAlbahari are there any plans to extend linqpad to mono? I'm a premium member/bought the book, I love C# and I'd really like to see products like this penetrate more than just the windows ecosystem.Tver
Any chance of finding another syntax editor and dealing with the Win32 dependencies? I know its not a trivial task but it might make for some great technical writing. Perhaps MS would be interested in assisting to complement their newfound OS love. This is one of the only tools I truly miss when doing Mac dev right now.Wildebeest
@JoeAlbahari Any updates on this since .NET Core is gaining traction? I'd really love to run LINQPad on Ubuntu.Germainegerman
Y
5

I also wanted to get LINQpad running under OSX and have found after using the above linked 0.92 version from Joe that it does not seem possible.

Although the app starts up under mono and displays the familiar LINQPad screen if you try and run any query it simply crashes and disappears.

Reason being is that there seems to be some use of a WebBrowser control in that LINQPad version and according to the errors displayed in the terminal window it would appear that libgluezilla is required. From doing some digging about libgluezilla I've seen a few replies from Mono devs that it isn't and won't be available for mac, which is a shame.

Error for reference:

mono linqpad.exe
libgluezilla not found. To have webbrowser support, you need libgluezilla installed
Yogh answered 13/11, 2012 at 20:7 Comment(0)
G
3

LinqPad is probably the one thing I miss from moving entirely to Mac for development and I'm not going to run a VM just to access it. As mentioned above, Xamarin Workbooks is actually a pretty decent replacement for macOS.

Iterating regex matches ref:https://mcmap.net/q/384026/-looping-through-regex-matches

Gala answered 3/1, 2019 at 22:16 Comment(0)
E
1

If you look at the Mono documentation, it says that LINQPad is one of the applications they use to test their WinForms implementation:

Winforms Samples - Mono

That said, I have to imagine that they've been able to get it to work themselves.

Epoxy answered 10/9, 2010 at 2:44 Comment(1)
@ifwdev - I just saw the exception you posted. It looks like the newer versions of LINQPad require WPF (which Mono doesn't implement). You might want to try downloading a previous version of LINQPad.Epoxy

© 2022 - 2024 — McMap. All rights reserved.