Folks, is there any smart way to easily find unused files in entire solution? My project was consolidated by previous developer and it gained size at least 3x. I'd like to shrink the size of project but I cannot find quick and easy way. Any advices?
Folks, is there any smart way to easily find unused files in entire solution? My project was consolidated by previous developer and it gained size at least 3x. I'd like to shrink the size of project but I cannot find quick and easy way. Any advices?
Share Improve this question asked Apr 16, 2012 at 14:18 DarjDarj 1,4031 gold badge19 silver badges47 bronze badges 3- 1 Use Resharper trial version and do cleanup files. Check the Redundancies in the Code section under Inspection Severity in the Resharper Options – Kiru Commented Apr 16, 2012 at 14:23
- Seems like a great tool. Unfortunately my pany does not allow to install trial versions of software. – Darj Commented Apr 16, 2012 at 14:39
- Possibly useful SO thread – EdSF Commented Apr 16, 2012 at 15:05
4 Answers
Reset to default 3This open source project might be a good place to start. It's meant to filter out unused images, but it should be pretty easy to change so it looks for unused files.
Find unused images in VS Web Projects
How about writing a program to do it? Could be a neat little project for a junior dev to write for you.
I think finding unused code is a job for a static analysis tool. As @kiru mentioned, Reshareper has this functionality and it is easy to use. They also offer a 1-month trial version.
The extension in the selected answer above only works in vs2012 while Code Maid works in vs2010 - vs2014:
There is a free extension called Code Maid that "is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding." Does images as well.