Thursday, February 2, 2012

VS2010 Missing Import Quick Fix Usability

Usability Issue: Microsoft Visual Studio 2010 Missing Import Quick Fix

For a beginner, it would be difficult to quickly get used to working on Microsoft Visual Studio. Most of the concerns are related to the textual editing of the codes. Some of these issues, such as where to references, were resolved in VS 2010, but the rest are still around.

One of the noticeable issues that I have faced many times is the missing import quick fix button. The behavior of the quick fix button is annoying and unpredictable. The missing import icon does not show up all the time; you have to keep moving the mouse cursor or hitting some keys to make it show up.

The behavior seems unpredictable, and when it happens – maybe many times – it causes you to consume more time than you would if you simply added the missing assembly on your own.

To find out that issue, do as follow:
1- Create a new C# class, and name it for instance: TestClass.
a.     Make it extend a type of List String, and intentionally, do not add the import for that List String, given that you are going to use Microsoft quick fix support.

2- The resolve import icon is not shown, and it could confuse you with the shown help message.

3- Re-hover back by moving the cursor around until the icon shows up. The cursor would stay forever unless you focus on something else.

4- Finally, we have the resolve import button.

I could say that “resolving imports” is an important feature that improved the user experience of VS, and it is also a rare feature that provides a quick-fix resolution for errors. It was recently introduced by VS to make the assembly referencing better. But, I think that they rushed into its implementation, as this issue appears many times and causes the feature behavior to operate unexpectedly.
Also, when you are heavily using the editor, this issue is going to show up periodically, and make you prefer manually importing and adding assemblies...

Recommended resolution
One more thing, the quick fix only works when you hover over the error statement. It would be better to get quick fix icon displayed on the left gutter as well.

This step is more indictable for users who need to perform a quick fix in one place. In addition, when you have too many errors in your class, you will simply go through the left gutter to pick fixes for each piece of code.

Environment details:
Operating System: Windows 7 Ultimate.
Visual Studio Edition: VS 2010 Express C#

Microsoft Visual Studio 2010 Editions

No comments:

Post a Comment