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.

Jonas
  • 121,568
  • 97
  • 310
  • 388
kwcto
  • 3,494
  • 2
  • 26
  • 33
  • Can you get the exceptions details? If so print them here. – Preet Sangha Sep 10 '10 at 02:39
  • I see in Terminal some more info: – kwcto Sep 10 '10 at 03:10
  • ** (/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: 31bf3856ad364e35 – kwcto Sep 10 '10 at 03:11
  • This means that it need the WPF assembly PresentationCore - is there a mono equivalent – Preet Sangha Sep 10 '10 at 03:18
  • Ah, maybe if I read directions better. I need "Olive" which is not included with mono by default. – kwcto Sep 10 '10 at 03:29
  • It seems to me that this question has become more relevant with age! – kwcto May 04 '15 at 01:53

4 Answers4

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.

Joe Albahari
  • 30,118
  • 7
  • 80
  • 91
  • 5
    Well I guess you'd know better than anyone. At least I learned a bit about Mono anyway. Thanks Joe... – kwcto Sep 10 '10 at 04:23
  • 1
    Joe: Do you think an older version might work? (see Justin's comment) – kwcto Sep 10 '10 at 13:03
  • Yes - I expect a VERY old version would work (0.9x). Unfortunately, I no longer has this version on file. – Joe Albahari Sep 10 '10 at 13:29
  • 3
    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. – Joe Albahari Sep 18 '10 at 05:24
  • @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. – t3dodson Sep 21 '14 at 18:09
  • 1
    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. – kwcto Dec 19 '14 at 01:40
  • 19
    @JoeAlbahari Any updates on this since .NET Core is gaining traction? I'd really love to run LINQPad on Ubuntu. – Roly Nov 08 '16 at 18:37
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
gazp
  • 53
  • 1
  • 5
2

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://stackoverflow.com/a/8480659/132599

David Clarke
  • 12,888
  • 9
  • 86
  • 116
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.

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
  • @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. – Justin Niessner Sep 10 '10 at 03:35