.netjavascriptclrdynamic-language-runtimeecma262

Are there any .NET CLR/DLR implementations of ECMAScript?


Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is for Java. A solid port of Rhino running on .NET Framework / Mono Framework would be perfect.

I've only seen a handful of projects mentioned but never seen any come to light or in reality anything that I've ever been able to run script on. Here's what I know about already:

For background, I want to be able to execute JavaScript from within .NET; i.e. load up a set of scripts into context and call into that context and retrieve the execution results. Currently I jump through hoops to use MSScriptControl via cumbersome COM Interop. The inconsistency of COM makes it really tough for deployment and ensuring consistent execution.

I'd like to be able to execute reasonably complex JavaScript test harnesses from within .NET. This isn't for creating user macros or simple tiny scripts; I need a real JavaScript environment like Rhino. If the implementation was running on top of the CLR (rather than COM) this would really help with some of the current issues.


Solution

  • Currently, I've modified a version of the EcmaScript.NET inside my YUICompressor.NET port (project).

    If you grab the source code from here, I've included my modified code in the project, which you can reference. This is the only source of code i've found in .NET which can handle parsing javascript, server side.

    Unfortunately, I can't remember how I finally found it. It was a tough process, I must admit. I think i found some references Mozilla dev pages somewhere about Rhino (the java code) which led me to finding that C# .NET implimentation.

    I had to modify it slighty to sync up with some changes the YUI Compressor guys did to their code branch. So the modified branch I have might not be the best .. but it's the closest I've seen to the original Java branch.

    The original c# code for EcmaScript.NET hasn't been touched since 2007 ... at least for the downloads page.

    Maybe this might help??

    HTH.