Visual Studio Remove Unused References With Organize Usings

Remove Unused References In Visual Studio By Organize Usings Command For C# VB.NET COde Behind

When we create a new website or project in visual studio, several namespace references are added in code behind by default.

Visual studio Remove unused references using organize using

It's always advisable to remove all unused usings and references from code behind for better performance.

We can follow steps mentioned below to remove all unused usings and references.

FOR C# APPLICATIONS OR PROJECTS

Open code behind of the page u want to remove unused references,
Right click > Organize Usings > Remove Unused Usings




All unused usings will be removed as shown below.



FOR VB.NET APPLICATIONS

Right click on My Project in solution explorer > Select Open.


Select References tab and click on unused references button.


Check the check box for references you want to remove and click on remove.


Hope this helps.


If you like this post than join us or share

Find More Articles