views:

23

answers:

3

I am building a class library, and I am getting an error and I know that I need to add a reference. Does VS have a feature where it will find the required library automatically, or do I need to know where the library is located and add the reference manually.

In java/eclipse, you may right click like and jars will be found automatically if on the build path, does VS have this concept?

A: 

ReSharper has a feature to do this. If it knows which assembly has the referenced type, it will suggest adding that assembly as a reference.

John Saunders
+1  A: 

We use Resharper for that feature and a lot of many other improvements to the IDE.

Couldn't use Visual Studio anymore without it.

Ilias Bartolini
A: 

If you go alt+shift+F10 on the item that's missing a using it will suggest you the appropriate option (but you obviously need to have the assembly referenced already).

I am not aware of any way of running this on all the items in a single go though (without ReSharper).

JohnIdol