16

I want to enhance an application with scripting support like many other applications have, e.g. MS Office using VBA or UltraEdit using JavaScript.

Which libraries do exist for C#/.NET (and which language(s) do they support)?

ulrichb
  • 19,610
  • 8
  • 73
  • 87
  • Not sure how this applies since the Microsoft.Net Framework contains all the libraries already? Please can you eloborate on what you mean with Libraries in C#/.Net to avoid confusion? – BinaryMisfit Jul 01 '09 at 07:48
  • There's also more discussion here: http://stackoverflow.com/questions/137933 – Matthew Scharley Jul 01 '09 at 07:55

7 Answers7

12

Please check CS Scripting library

Here is an article about scripting Photoshop CS with C#

This one discusses using LUA as scripting lib with C#.

TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188
6

IronPython is a dynamic .NET scripting language.

IronPython is an implementation of the Python programming language running under .NET and Silverlight. It supports an interactive console with fully dynamic compilation. It's well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers, while maintaining compatibility with the Python language.

See IronPython embedding for examples showing ways to call IronPython from .NET apps. The IronPython Calculator and the Evaluator goes into the details of using IronPython from a C# application.

gimel
  • 83,368
  • 10
  • 76
  • 104
2

Lua is often touted as being one of the better ones... Try looking at this other question for more information: What are the most effective ways to use Lua with C#?

Also:

Community
  • 1
  • 1
Matthew Scharley
  • 127,823
  • 52
  • 194
  • 222
2

See "What is the best scripting language to embed in a C# desktop application."

Also see "It Already Is A Scripting Language" from Eric Lippert.

Community
  • 1
  • 1
maxwellb
  • 13,366
  • 2
  • 25
  • 35
0

Don't forget LSharp, LISP in .NET. Something to keep an eye on if you are exploring functionality stage. Maybe Rob Blackwell will be glad to hear you're considering it.

maxwellb
  • 13,366
  • 2
  • 25
  • 35
0

You can bake your own scripting environment with Mono.CSharp (just one simple dll) or Roslyn, both are getting quite mature now.

Mono contains the Evaluator class and Roslyn the ScriptEngine, both make it a breeze setting up a script environment. Of course something like ScriptCS already builds on that (Roslyn) and gives you more features.

For an C# script environment built on Mono.CSharp you can check out CShell (which I made).

lukebuehler
  • 4,061
  • 2
  • 24
  • 28
0

Depending on your needs, the SILK library might be a good option.

It's an easy to use interpreter. The interpreted language is not C#. It's a custom language that was designed to be easy to use (very little punctuation, not case sensitive, etc.) But it does support functions.

Built-in functions are handled via events. That is, when the interpreted code calls one of your internal functions, it raises an event in your program.

Jonathan Wood
  • 65,341
  • 71
  • 269
  • 466