I have a desktop application written in C# I'd like to make scriptable on C#/VB. Ideally, the user would open a side pane and write things like
foreach (var item in myApplication.Items)
item.DoSomething();
Having syntax highlighting and code completion would be awesome, but I could live without it. I would not want to require users to have Visual Studio 2010 installed.
I am thinking about invoking the compiler, loading and running the output assembly.
Is there a better way?
Is Microsoft.CSharp the answer?
Use a scripting language. Tcl, LUA or even JavaScript comes to mind.
Using Tcl is really easy:
Then use it like: