I'm relatively new to Mono, and I'm trying to add C # scripting capabilities to my application. I found this blog post by Miguel de Icaza. The way to call the C # compiler as a service is to enable Mono.CSharp and use the Evaluator class, in particular the Evaluate or Run methods. This is described here .
So here is my sample code (obtained from other blog posts on the Internet on this subject, yes, I did my search on the Internet)
using System;
using Mono.CSharp;
namespace EvalTest
{
public class Test
{
static void Main(string [] args)
{
Mono.CSharp.Evaluator.Evaluate("using System;");
Mono.CSharp.Evaluator.Run("using System;");
}
}
}
And when we try to compile it, I get the following errors:
eval.cs(10,19): error CS0234: The type or namespace name `Evaluator' does not exist in the namespace `Mono.CSharp'. Are you missing an assembly reference?
eval.cs(11,19): error CS0234: The type or namespace name `Evaluator' does not exist in the namespace `Mono.CSharp'. Are you missing an assembly reference?
Linux OSX, Mono, Silverlight . stackoverflow , Miguel . ? - , ? .