RCIX
RCIX

Reputation: 39427

Visual Studio Usings Plugin

I find the usings remove and sort ability to be highly useful, but does anyone know of a tool that will scan my code looking for unrecognized types, look through available namespaces, and offer me possible listings to use?

Upvotes: 1

Views: 150

Answers (2)

Greg D
Greg D

Reputation: 44066

Visual Studio will do that with assemblies that your project has references to. Use a type whose namespace isn't already included, but is available via the referenced assemblies. If you mouseover it, you'll get a little popup in the bottom, left corner of the symbol. That will let you automatically pull in the appropriate using.

I use this all the time with the CLSCompliantAttribute in AssemblyInfo.cs b/c System isn't available there by default. I also find myself pulling in System.Diagnostics this way pretty frequently when I find I need to add a trace to a bit of code.

Upvotes: 2

bytebender
bytebender

Reputation: 7491

You do know about the shortcut key: Shft+Alt+F10 when the cursor is on the unrecognized type? Or if you are a mouse user I believe there is a dropdown...

Upvotes: 2

Related Questions