XML-based .NET Scripting Language?

G

Gene Jones

So I'm starting to do some things where I'm going to want to add
scripting in the application, and I can't find a scripting language to
plug in that I like. So far I've looked at LUA and L-Sharp, but
neither appeals to me. TCL would be okay, I guess, but still not
really ideal.

My Googling hasn't turned up anything, so I figured I'd ask here:

1) Is there some way to make C# an embedded scripting language? (I
doubt it, but it seems worth asking where somebody will definately
know)

2) Is there an XML-based scripting language that's easily embeddable
into a .NET application? By XML-based, I literally mean it's some
language expressed in XML format. I know there aren't a lot of these
around, but I'm just kind of hoping really hard at this point.

Thanks for your time.
 
J

Jon Skeet [C# MVP]

Gene Jones said:
So I'm starting to do some things where I'm going to want to add
scripting in the application, and I can't find a scripting language to
plug in that I like. So far I've looked at LUA and L-Sharp, but
neither appeals to me. TCL would be okay, I guess, but still not
really ideal.

My Googling hasn't turned up anything, so I figured I'd ask here:

1) Is there some way to make C# an embedded scripting language? (I
doubt it, but it seems worth asking where somebody will definately
know)

2) Is there an XML-based scripting language that's easily embeddable
into a .NET application? By XML-based, I literally mean it's some
language expressed in XML format. I know there aren't a lot of these
around, but I'm just kind of hoping really hard at this point.

The other day I saw a colleague embedding some C# in a NAnt script.
It's not something I've used myself, but it might be worth a look.

(For what a C#-like scripting language might look like, you might be
interested in Groovy, which is Java-based: http://groovy.codehaus.org)
 
M

Markus Stoeger

Gene said:
So I'm starting to do some things where I'm going to want to add
scripting in the application, and I can't find a scripting language to
plug in that I like. So far I've looked at LUA and L-Sharp, but
neither appeals to me. TCL would be okay, I guess, but still not
really ideal.

My Googling hasn't turned up anything, so I figured I'd ask here:

1) Is there some way to make C# an embedded scripting language? (I
doubt it, but it seems worth asking where somebody will definately
know)

Have a look at the CodeDomProvider class on MSDN. It shows an example of
how to compile an assembly from source code at run time. After compiling
and loading such an assembly you can instantiate exported types and call
functions on them.

hth,
Max
 
A

Andrew Faust

Gene said:
So I'm starting to do some things where I'm going to want to add
scripting in the application, and I can't find a scripting language to
plug in that I like. So far I've looked at LUA and L-Sharp, but
neither appeals to me. TCL would be okay, I guess, but still not
really ideal.

You could always try Python. Check out IronPython, it's a .NET
interpreter for the Python scripting language, and as such is easily
embedded in your own applications.

Andrew Faust
 
K

Kamek

Andrew said:
You could always try Python. Check out IronPython, it's a .NET
interpreter for the Python scripting language, and as such is easily
embedded in your own applications.

Andrew Faust

Try boo.codehaus.org its a really easy language and has lots of support
for embedding like your talking about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top