Visual Studio
How to: Remove Unused References (Visual Basic)

In order to reduce the size of your application, you may want to remove references to components that are not actually called by your code. This can be done using the Unused References dialog box, accessible from the References page of the Project Designer.

To remove unused references

  1. In Solution Explorer, double-click the My Project node for the project.

    In the Project Designer, click the References tab.

  2. Click the Unused references button to open the Unused References dialog box.

    The project is scanned, and the dialog box is populated with a list of references that are not being referenced in your code.

  3. In the Unused Referencesdialog box, check the references that you wish to remove, and then click Remove.

    The selected references will be removed from the project.

See Also

Tasks

Other Resources

Tags :


Community Content

derecskey
C# Equivalent?
How do I do this in C#?

Thomas Lee
Bump for a C# equivalent
With 2008, we now have project-wide "remove un-needed usings" with the PowerCommands for Visual Studio 2008 1.0 plugin/add-on. (http://code.msdn.microsoft.com/PowerCommands). Maybe the Visual Studio Team could include these functions with the default install? :) Maybe there's a way to do this already? Anybody? Thank you, and have a nice day.

roncli
Re: Bump for a C# equivalent
While PowerCommands is indeed a very useful tool, "remove unneeded usings" is not the same as "remove unused references".
Tags :

Page view tracker