0

Is there an easy way to embed Javascript in a C# application?

I want to make my C# application scriptable.

I have used Lua for this in the past but would like to use Javascript in this instance. LuaInterface is a nice C# wrapper for the C Lua API and it made it really easy to embed Lua in C# and a lot less painful than writing a Managed C++ wrapper for the Lua API (I have tried that as well).

Are there any C# libraries around for embedding Javascript that are as easy to use as LuaInterface?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ashley Davis
  • 9,896
  • 7
  • 69
  • 87

2 Answers2

4

There is one: Jint (http://jint.codeplex.com)

Sébastien Ros - MSFT
  • 5,091
  • 29
  • 31
0

You may consider working with the DLR (Dynamic Language Runtime).

Managed JScript is built on the top of DLR (can't insert second link as I'm a new user):

http://blogs.msdn.com/deepak/archive/2007/05/02/managed-jscript-is-availaible.aspx

emvy
  • 89
  • 2
  • Managed JScript would be great, but it sounds like it is no longer available: http://stackoverflow.com/questions/775339/where-can-you-download-managed-jscript-for-the-dlr – Ashley Davis Jun 25 '09 at 10:41