Bug 10192 - Mono.CSharp.Evaluator: GetUsing() returns wrong result
Summary: Mono.CSharp.Evaluator: GetUsing() returns wrong result
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2013-02-09 10:59 UTC by lukebuehler
Modified: 2013-02-26 17:09 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description lukebuehler 2013-02-09 10:59:04 UTC
When using the mono CSharp.Evaluator (in version 3.0.x) when I call evaluator.GetUsing() the returned "using" statements are all the same.

To reproduce the mono csharp REPL is fine:
In 2.10.9:
   csharp> ShowUsing();
   using System;
   using System.Linq;
   using System.Collections.Generic;
   using System.Collections;

In 3.0.1 (other minor version too):
   csharp> ShowUsing();
   using Mono.CSharp.UsingNamespace;
   using Mono.CSharp.UsingNamespace;
   using Mono.CSharp.UsingNamespace;
   using Mono.CSharp.UsingNamespace;

As you can see the all the using statements are just "using Mono.CSharp.UsingNamespace;".

I tested under Windows 7 x64 (I haven' tested it anywhere else).

To be able to get the using statements is actually quite important for me since I wanna support code completion in a scripting environment (via NRefactory). And often I do not know what usings are already loaded in the evaluator.
Comment 1 Marek Safar 2013-02-11 09:01:25 UTC
Already fixed in 3.x series about 3 months ago
Comment 2 lukebuehler 2013-02-26 17:09:11 UTC
Thank you! The 3.0.4 release was like Christmas for me ;-)