Yesterday I made a screencast demonstrating Moonlight Development on Mac using MonoDevelop. Today, I bring you the same thing on Linux:
Unfortunately, getting this running isn't quite as simple as the Mac installer. However, if you're on openSUSE/SLED, it's almost as easy, using my trunk MonoDevelop packages from the openSUSE build service (1-click install for openSUSE 11.1).
You just have to download and extract my Moonlight SDK, extract it somewhere, then tell MonoDevelop where it using the MOONLIGHT_2_SDK_PATH environment variable:
export MOONLIGHT_2_SDK_PATH=/full/path/to/MoonSDK monodevelop
If you don't have openSUSE/SLED, you'll have to use the Mono 2.4 VMWare image or build MonoDevelop from trunk. If you build MonoDevelop from trunk, I suggest not installing it, and instead using "make run". If you don't even have Mono 2.4, you'll need to build that too, and please use a parallel environment if you don't want to risk messing your system up with hard-to-diagnose problems.
Comments
Christophe Narbonne
Fri, 2009-05-08 03:35
Permalink
how to see moonlight?
I use moonlight 1.9 preview in 64 bits as an xpi in my firefox 3.5... but I always see the MS logo which ask me to install Silverlight...
It seems to sadly only works with firefox 3.0...
Christophe Narbonne
Fri, 2009-05-08 03:37
Permalink
But thanx
sorry to complain me, and thanks for the tips
Michael
Fri, 2009-05-08 03:42
Permalink
That sounds like a Moonlight bug
It sounds like Moonlight is not compatible with Firefox 3.5. Maybe you should file a bug against Moonlight?
Ryan
Fri, 2009-05-08 10:23
Permalink
Works for me
I had similar problems with 1.9 and FF 3.5 on 64bit but everything seems fine with 1.9.0.1. Firefox didn't offer the upgrade automatically, I had to go back to the preview page and grab it myself.
Mika
Fri, 2009-05-08 07:57
Permalink
Good job!
Awesome! Can't wait MonoDevelop 2.2 release :)
Anonymous
Tue, 2009-06-09 11:50
Permalink
Update?
Any word on the next MonoDevelop Mac snapshot? :D
G
Sat, 2009-06-13 12:33
Permalink
BuildError
Hi:
I followed the instructions but still get the error: could not find respack. Which I assume from looking through the src is in tools/respack.cs ?
And also even with the Moonlight SDK path exported monodevelop also has errors in References -> System.Windows (Assembly not found) and System.Windows.Browser (Assembly not found). I saw someone else commented on this problem on the Mac video for Moonlight.
Anyone help?
G
Sat, 2009-06-13 12:37
Permalink
Oh, btw, this is in Open Suse
Oh, btw, this is in Open Suse 11.1
Michael
Sat, 2009-06-13 16:57
Permalink
Trunk MonoDevelop?
Are you using the trunk MonoDevelop packages? It won't work with MD 2.0.
G
Sun, 2009-06-14 12:34
Permalink
Moonlight
Hi:
I used the link for the one click install -- got monodevelop 2.1.0
DL and extracted MoonSDK
Exported MOONLIGHT_2_SDK_PATH
Did I miss a step?
Michael
Fri, 2009-09-18 23:33
Permalink
That looks correct
That looks correct. Are you sure you did the export in MonoDevlop's environment?
Nikanth Karthikesan
Tue, 2009-07-14 06:28
Permalink
Cool, thanks! You could
Cool, thanks!
You could change your spec to need the dependent packages also to be pulled. I had a older version installed along with its dependencies and this version could not work with it. I kept getting, "Invalid URI: The format of the URI could not be determined".
Michael
Tue, 2009-07-21 20:39
Permalink
I'll have to investigate that
Thanks for the tip! I'll have to investigate that. I'm not terribly familiar with package specs; I just set it up a couple of years ago, with a script for pushing new snapshots :-)
Lino
Wed, 2009-07-22 06:33
Permalink
Boo Moonlight code
Is it possible to use Boo language code to build a Moonlight app?
Michael
Wed, 2009-07-22 12:03
Permalink
I don't know, but I don't think so
You'd have to ask the Boo compiler developers to add support for targetting the "2.1" runtime version, then we'd have to update the MonoDevelop Boo binding to use whatever new compiler flags were needed.
scitesy
Mon, 2009-08-24 21:26
Permalink
MonoDevelop 2.2
Will MonoDevelop 2.2 have built-in Moonlight 2 support?
Michael
Fri, 2009-09-18 23:31
Permalink
Somewhat
It'll have the build/run and basic code completion I demoed here. I'm hoping to get more advanced capabilities in 2.4, by which time the Moonlight SDK should be officially available.
Alex Corrado
Tue, 2009-09-01 20:06
Permalink
Gtk# bindings for Moonlight
Michael,
Thank you for posting this. Following your instructions, I have successfully set up MonoDevelop with the Moonlight SDK (openSUSE 11.1).
I'd very much like to create a desktop application with a Moonlight UI, but I can't figure out how to make use of the Gtk# bindings for Moonlight. I believe the problem is that I'm missing Moonlight.Gtk.dll. Is there an SDK release that includes this file? Forgive me if I am being dense, but could you please post a quick tutorial on how to use these bindings?
Thanks again!
-Alex
Michael
Fri, 2009-09-18 23:29
Permalink
Unfortunately
Unfortunately a desktop SDK hasnt been released. You'd need a desktop version of the runtime too.
I'm hoping the Moonlight team will sort this out after they make their 2.0 release.
Adam May
Mon, 2010-02-08 06:54
Permalink
Developing Moonlight apps with MonoDevelop 2.2.1 on Linux
With many thanks to Michael, here's what's required to get the latest version of MonoDevelop (2.2.1) ready for Moonlight 2 development on Linux.
My installation was done on OpenSUSE 11.2. YMMV.
First, ensure that you're running the latest version of Mono (2.6.1) and MonoDevelop (2.2.1). Mono can be downloaded from http://www.go-mono.com/mono-downloads/download.html and MonoDevelop can be downloaded from http://monodevelop.com/Download.
With both of these installed, if you try and compile a Moonlight project from within MonoDevelop, you'll get an error stating that the Silverlight framework is not installed. Both the environment variable and the MoonSDK have changed since Michael's May 8 post, so don't install the MoonDSK as advised above. Instead, you'll have to grab the new SDK from out of the MacOSX MonoDevelop package.
If you've got a Mac nearby (as I was lucky enough to), you can grab the entire /Applications/MonoDevelop.app/Contents/MacOS/lib/moonlight
directory and place it in /usr/lib/moonlight. If you're not lucky enough to have a Mac nearby, then you'll need to use dmg2img and mount the image file to be able to extract the files. According to Michael , the moonlight team may have the necessary official Linux packages ready shortly.
Finally, I had to set the environment variable MOONLIGHT_SDK_PATH to point to /usr/lib/moonlight. I achieved this by adding the following line to my ~/.bashrc:
export MOONLIGHT_SDK_PATH=/usr/lib/moonlightYou then should be able to develop, run and debug Moonlight projects through MonoDevelop on Linux.
Happy developing!
Michael
Mon, 2010-02-08 13:42
Permalink
Thanks for posting this
Thanks for posting this update to my rather out-of-date instructions - hopefully this will help other people get up and running.
One note - you don't need to set MOONLIGHT_SDK_PATH if, as in your example, the SDK assemblies are in $prefix/lib/moonlight relative to the current target runtime.
Adam May
Tue, 2010-02-09 22:52
Permalink
Double checked the need for MOONLIGHT_SDK_PATH
Michael - I went back and double checked the requirement for having MOONLIGHT_SDK_PATH set.
Once I removed it, MonoDevelop ran as expected, so I can only put it down to my error and I stand corrected. :)
Anonymous
Sat, 2010-11-20 09:07
Permalink
corelib problem
Hi, I followed the instructions on this page but when I try to build the hello moon solution I get the following error:
"Corlib too old for this runtime.
Loaded from: /usr/lib/moonlight/2.0/mscorlib.dll"
I am using monodevelop 2.4 on Arch linux x64, and extracted the moonlight folder from the mac version of
MonoDevelop-2.4.dmg
Do you have any advice as to how i can get this to work?
Thanks.
Michael
Thu, 2010-12-02 20:38
Permalink
Needs an matching Mono
Unfortunately the Moonlight C# compiler (smcs) currently only works with a matching version of Mono (for Moonlight 2.0, likely Mono 2.6.x). You will probably have to obtain an older mono binary and patch the smcs script to use it.
kesalin
Sat, 2011-10-15 00:37
Permalink
Error: Framework 'Moonlight / Silverlight 4.0' not installed.
Hi, I followed the instructions on this page but when I try to build the hello moon solution I get the following error:
Error: Framework 'Moonlight / Silverlight 4.0' not installed.
I used monoDevelop 2.8.1 on Mac and have moved moonlight to /usr/lib/monlight.
Do you have any advice as to how i can get this to work?
Anonymous
Wed, 2010-02-10 07:55
Permalink
Thanks
Thanks a ton for posting this update. I, too, had problems getting it all to run from a recent compile on my Ubuntu box. However, pulling the SDK out of the Mac package and moving it directly to /usr/lib/moonlight did the trick. Cheers--
chelah
Fri, 2010-07-23 18:26
Permalink
Ubuntu
For Ubuntu you need to install it.
$ sudo apt-get install monodevelop-moonlight