Bug 36127 - Productivity enhancement idea: store common "using" namespaces for automatic evaluation when starting Inspector
Summary: Productivity enhancement idea: store common "using" namespaces for automatic ...
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Client: Cross Platform (Shared Code) ()
Version: 0.3.2
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Future
Assignee: xamarininteractive
Depends on:
Reported: 2015-11-21 19:22 UTC by Matt Samet
Modified: 2016-10-20 22:06 UTC (History)
3 users (show)

Tags: feature_request
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 for Bug 36127 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description Matt Samet 2015-11-21 19:22:04 UTC
Inspector is looking great so far and already very helpful in my workflow!  I have an enhancement request.

In my project, I tend to need to invoke a lot of my own code and various framework code each time I debug.  These are located in various namespaces (for example, in my PCL project and my iOS project, in MvvmCross's various namespaces, etc.  Every time I start the inspector, I need to run several "using Blah" to get access to the functionality I need.  For example, "Mvx.Trace" is part of MvvmCross that I use all the time.

It would be awesome if I could store the list of these commonly-used namespaces in the Inspector, or in the project/solution settings somewhere, so every time the Inspector starts, it would just auto-run these using statements and my code / frameworks would be immediately available for debugging.

A bonus would be detection if the specified namespaces are actually present in the loaded assemblies (and skipping them if they aren't), but this isn't necessary.

Comment 1 Aaron Bockover [MSFT] 2015-11-21 23:34:29 UTC
Hi Matt,

We're definitely looking into this, but we're trying to be careful on how we address it. There are a lot of similar and related, but not quite identical things we think we can accommodate to make Inspector more streamlined on "similar session" cases. An extreme would be saving and replaying full sessions, marking parts of a session as recorded (e.g. macro mode), etc, and "default namespaces" sort of fall into this category.

Thanks for the feedback!
Comment 2 Aaron Bockover [MSFT] 2015-11-21 23:39:30 UTC
As an aside: if you enter an invalid namespace in Inspector today it will be ignored, albeit verbosely. That is, you can enter a slew of valid and invalid namespaces, and only the valid ones will register. The invalid ones will result in a lot of error/warning spew however. Perhaps we could just suppress that particular compiler error (CS0246).

> using Invalid1; using System.IO; using Invalid2; using System.Collections.Concurrent

This will result in a bunch of error spew, but both System.IO and System.Collections.Concurrent will end up in scope for subsequent REPL input...

The reason it's worth mentioning is that today you could have a snippet and XS and just paste it into the Inspector. Certainly not ideal, but better than typing by hand!
Comment 3 Aaron Bockover [MSFT] 2016-01-13 21:48:36 UTC
FYI, the upcoming 0.5 Inspector release quiets the warning message for importing namespaces multiple times, so a copy/paste of a large set of potentially duplicate namespaces as I mentioned in my previous comment should be less annoying.