This project has moved and is read-only. For the latest updates, please go here.

Irony on the compact framework?

Mar 4, 2010 at 2:34 PM

I'm very interested in Irony, it looks like a really cool tool for implementing DSLs for game scripting. However, I hit a bit of a brick wall last night when testing Irony on my xbox using XNA. When I run the application on the xbox I get a TypeLoadError. I suspect this is because Irony is using something not available on the CF (although I get no build errors, so I can't offer any clues as to what)

What are the chances Irony could be made to run on the compact framework?

Mar 5, 2010 at 5:55 PM

TypeLoadError - what type cannot be loaded?

Is the compact framework you're talking about is the same as "Silverlight" framework? There's IronySilverlight project which builds special reduced version - can it be what you need?


Mar 5, 2010 at 6:18 PM
Edited Mar 5, 2010 at 6:36 PM

The exact type is not specified, the most information I can give you is the error message:


An unhandled exception of type 'System.TypeLoadException' occurred in Microsoft.Xna.Framework.Game.dll
Additional information: File or assembly name 'System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found.


I'm guessing this is because this version of System.Core is not availbe on the compact framework.


It seems that the compact framework and the silverlight framework are slightly different, but the silverlight version may work on xbox. Unfortunately I can't load the silverlight csproj (file type not supported by this installation). I'm using vs2008 professional,so I'm not sure what that's all about :/


EDIT:: After messing around a little, I got this to compile and run on xbox. I referenced the xbox 360 versions of System and System.Core, I had to include the HashSet and Stopwatch from the silverlight version, and then strip out everything in the microsoft namespace. I assume that all this had to be done for the silverlight equivalent too?

Is there any chance of adding a compiler conditional XBOX, which would basically do exactly the same as the silverlight one?

Ie, make all #if Silverlight into #if Silverlight | XBOX

Mar 5, 2010 at 6:56 PM

I think you should find out what are the proper references to system assemblies for your Xbox environment, rebuild Irony with these new references. Explore the documentation, what should be the refs. Similar to IronySL project - it references specific versions of System assembly (and others), the ones that come with Silverlight SDK.

Mar 5, 2010 at 7:32 PM

The correct references come with the XNA framework, they're not difficult to swap over. The difficult thing is ripping out all the BigNumber and ComplexNumber support, I removed all of that for testing, but of course I want to be able to update from SVN without havint to redo that every time!

Is the stuff in the Microsoft namespace cut out the by silverlight compiler conditionals?

Oct 10, 2014 at 5:45 PM

Do you have a copy of your ripping out of the BigNumber and ComplexNumber support? I would love to see how you did it. I'm in process of doing this so I can use it on the Compact Framework.

Oct 10, 2014 at 6:17 PM
I've just searched through all my old project files but I'm afraid I can't find any old copies of Irony at all - I never pursued this as a way to add scripting to XNA/XBox360 games so it's been lost to various HDD upgrades over time :(

From what I remember I pretty much just removed all the non CF references and added in the CF equivalents. Then it was just a case of fixing things - mostly by deleting everything to do with the Microsoft.* namespaces that don't exist on CF. Your best bet is probably to take the silverlight version and change the target to the CF, from what I remember of how the CF works that ought to get you most of the way there.