We'll use a free tool which can be downloaded from the Visual Studio Gallery Extensions Tools:
The snapshot below is an example of removing unused references from a MVC C# application :
How to Remove unused references from C sharp projects in Visual Studio
After downloaded, install it:
Finished the installation, open the install Log :
As you can see, the tool will search all Visual Studio products in your machine, and will install itself only in the VS 10.00 versions:
After the setup, you will see another menu inviting to remove references.
Finished the setup, you can see that the tool has been added to Visual Studio:
Now you have a new option at the menu:
To test the tool, create a vanilla MVC C# project, and take a look at the assemblies:
Run the tool from the menu, to see the references removed:
Now there remained only the required assemblies to run the application:
That's all. We hope that this tool will be useful to you.
by Carmel Schvartzman
כתב: כרמל שוורצמן