Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to run LINQPad with Mono (Mac)

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.

like image 861
kwcto Avatar asked Sep 10 '10 02:09

kwcto


2 Answers

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.

like image 116
Joe Albahari Avatar answered Sep 28 '22 15:09

Joe Albahari


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 
like image 33
gazp Avatar answered Sep 28 '22 15:09

gazp