[MonoDevelop] MonoDevelop + Moonlight - again

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Feb 4 12:34:21 EST 2011


On Fri, Feb 4, 2011 at 1:36 AM, Jake Moe <jakesaddress at gmail.com> wrote:
> I've just upgraded my MonoDevelop to v2.4.2, and around the same time
> Mono upgraded to v2.8.  Now, when I try to compile a new Moonlight app,
> I get:
>
> Error 1: respack failed:
> Unhandled Exception: System.ArgumentException: Path is empty
>  at System.IO.FileStream..ctor (System.String path, FileMode mode,
> FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous,
> FileOptions options) [0x00000] in <filename unknown>:0
>  at System.IO.FileStream..ctor (System.String path, FileMode mode,
> FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
>  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor
> (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
>  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename
> unknown>:0
>  at ResourcePacker.Compress (System.Collections.Generic.List`1 files)
> [0x00000] in <filename unknown>:0
>  at ResourcePacker.Main (System.String[] args) [0x00000] in <filename
> unknown>:0
>  (1) (SLTest)
>
> I've found that error online, but I haven't been able to find any steps
> that tell what to do about it, other than try to build again.  When I do
> that, I get:
>
> Error: The compiler appears to have crashed. Check the build output pad
> for details. (SLTest)
>
> and the Build Output pad says:
>
> Building: SLTest (Debug)
>
> Building Solution SLTest
>
> Building: SLTest (Debug)
>
> Performing main compilation...
> /usr/lib/moonlight/2.0/smcs /noconfig
> "/out:/home/jmoe/Projects/SLTest/bin/Debug/SLTest.dll"
> "/r:/usr/lib/moonlight/2.0/System.Windows.dll"
> "/r:/usr/lib/moonlight/2.0/mscorlib.dll"
> "/r:/usr/lib/moonlight/2.0/System.dll"
> "/r:/usr/lib/moonlight/2.0/System.Core.dll"
> "/r:/usr/lib/moonlight/2.0/System.Xml.dll"
> "/r:/usr/lib/moonlight/2.0/System.Net.dll"
> "/r:/usr/lib/moonlight/2.0/System.Windows.Browser.dll" /nologo /warn:4
> /debug:+ /debug:full /optimize- /codepage:utf8 "/define:DEBUG"
> /t:library "/home/jmoe/Projects/SLTest/App.xaml.cs"
> "/home/jmoe/Projects/SLTest/Page.xaml.cs"
> "/home/jmoe/Projects/SLTest/obj/Debug/App.xaml.g.cs"
> "/home/jmoe/Projects/SLTest/obj/Debug/Page.xaml.g.cs"
> "/res:/home/jmoe/Projects/SLTest/obj/Debug/SLTest.g.resources,SLTest.g.resources"
>
>
> Corlib too old for this runtime.
> Loaded from: /usr/lib/moonlight/2.0/mscorlib.dll
>
>
> Corlib too old for this runtime.
> Loaded from: /usr/lib/moonlight/2.0/mscorlib.dll
> Build complete -- 1 error, 0 warnings
>
> ---------------------- Done ----------------------
>
> Build: 1 error, 0 warnings
>
> So I'm guessing that with the upgrade to MonoDevelop and/or Mono, I need
> a new Moonlight SDK?  If so, where can I get that from?  I had
> previously gotten it from the Mac binary download for MonoDevelop, so I
> tried that with the newest Mac download, but that appears to be the same
> version of Moonlight packaged in.  Is there anywhere else I can get it
> from to allow MonoDevelop to build Moonlight apps?

Yeah, two problems here:

1)

respack is a tool from the Moonlight SDK, and it seems to be crashing.
I don't know whether the Moonlight team is aware of this problem.

2)

The Mono C# compiler has to run on the same mscorlib.dll version that
it's building assemblies for, due to limitations in System.Reflection.
So smcs has to run on the Moonlight/Silverlight mscorlib. The problem
is that Mono mscorlibs are tightly bound to the Mono version, and the
Moonlight 2.0 SDK was built from Mono 2.6.x, so it can't run on Mono
2.8.x.

This is fixed in Mono 2.10, which has a reworked "mcs" compiler that
uses an alternative reflection API - so this new mcs could even be
used with Moonlight 2.6 SDK. So one workaround that might work would
be to upgrade to the Mono 2.10 preview packages, and replace the
"smcs" script in the Moonlight SDK with a script that invokes the new
"mcs" with the correct sdk arguments to make it target Moonlight.
Alternatively you could ask the Moonlight developers whether they have
a new sdk that will work with Mono 2.8.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list