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

Running Jurassic on WP7?

Sep 1, 2011 at 10:11 PM

Tried it, but it always breaks and the error message shows nothing really :(

Do you have an idea what could be wrong? I did try the Silverlight Jurassic dll. (and the other one, but don't work)


A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.Phone.dll

Sep 4, 2011 at 11:50 PM

Jurassic won't run on the current version of WP7 because it lacks the Reflection.Emit APIs that Jurassic requires.  However, I believe Reflection.Emit has been added in Mango.  Which version of WP7 did you try it on?

Sep 5, 2011 at 1:33 AM

I've tried it on Mango and it seems like Mango only provides a small portion of the Reflection.Emit namespace and not all of the features used in Jurassic are present.

Sep 6, 2011 at 1:25 AM
Edited Sep 6, 2011 at 1:25 AM

From reading the docs, at least DynamicMethod, ILGenerator and OpCodes are fully supported.  This means it should be feasible to get Jurassic working on WP7.1 (with some changes), though without any debugging support.

Sep 6, 2011 at 10:53 PM


Thanks for the response. Your thoughts were correct, it was pretty trivial to get Jurassic working on Mango (w/o debugging). I'm still testing it (see my thread on SetGlobalFunction and Silverlight, as it applies on WP, too), but it looks promising.



Sep 7, 2011 at 12:33 AM

Good news, thanks for investigating :-)

Sep 9, 2011 at 9:53 AM

Hi Zack/Paul

I'm just starting to look at WP7 Mango and would love to try to get this working too (I can try to help!).

To avoid duplication of effort, is there a working project/solution file I can use at all? If there is, I'd be very grateful if you could email it to me - me[at]slodge[dot]com


Sep 9, 2011 at 10:44 AM

Things I'm already playing with....

- #ifdef'ing out the debug half of GenerateCode() inside MethodGenerator.cs

- Adding a HashSet - similar to: - but adding a IEqualityComparer<T> constructor

Sep 10, 2011 at 6:19 AM
Edited Sep 10, 2011 at 6:19 AM

paul - is there anyway I can submit changes back to the project for WP7/Mango?

Basically there's:

- a class library project file for WinPho7

- a sample project (example app)

- a HashSet<T> class for WinPho7

- a couple of "#if WINDOWS_PHONE" statements to add to MethodGenerator.cs and to ScriptEngine.cs - just avoiding ReflectionEmitModuleInfo

There's no test project yet...

Sep 10, 2011 at 12:56 PM

Stuart: submit a pull request or just email me a zip file at paulbartrum[at]