[Mono-dev] Mono.CSharp.Evaluator: x.GetType Bug?
Marek Safar
marek.safar at gmail.com
Thu Jan 31 15:46:55 UTC 2013
Hi,
This is regarding Mono 3.0.3: Mono.CSharp.Evaluator
>
> When I instantiate an Evaluator and then then evaluate following input:
>
> var context = new CompilerContext(new CompilerSettings(), new
> ConsoleReportPrinter());
> var evaluator = new Evaluator(context);
> evaluator.DescribeTypeExpressions = true;
>
> object result = null;
> bool set = false;
> evaluator.Evaluate("class A{ public int X;}", out result, out set);
>
> //this works
> evaluator.Evaluate("var a = new A();a.GetType();", out result, out
> set);
> Console.WriteLine(result);
>
> //this doesnt work
> evaluator.Evaluate("var a = new A();", out result, out set);
> //Error here:
> evaluator.Evaluate("a.GetType();", out result, out set);
> Console.WriteLine(result);
>
> I get an error in the second last line:
> System.IO.FileNotFoundException: Could not load file or assembly 'eval-0,
> Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' o
> r one of its dependencies. The system cannot find the file specified.
> File name: 'eval-0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
> at <InteractiveExpressionClass>.Host(Object& $retval)
> at Mono.CSharp.Evaluator.Evaluate(String input, Object& result, Boolean&
> result_set)
> at MonoEval.Program.Main(String[] args) in
> C:\Users\Luke\Dev\Samples\MonoEval\Program.cs:line 30
>
This seems to happen only when run on .NET. Could you fill a bug report.
Thanks
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130131/8cc25a4b/attachment.html>
More information about the Mono-devel-list
mailing list