Last post Jun 21, 2013 03:14 PM by nvielbig
Jun 21, 2013 12:50 PM|nvielbig|LINK
As I'm trying to publish my application to our server, I am getting several errors, or warnings, indicating that I have references either being unused entirely, or pointing to the wrong framework (4.5, instead of 4.0). It will not let me publish until I
clean up these things. One of my co-workers said he thought there was a way of "removing unused references" automatically, but he couldn't find it when he looked yesterday. Is this a true option, or was he just imagining that?
By the way, this is Visual Studio 2012, most of the tutorials/guides that I have found are for 2010, and unfortunately it looks like this functionality is either lost or moved in 2012. Any help appreciated.
Jun 21, 2013 01:07 PM|Kishore Barik|LINK
Yes, your friend is right, there has a tool I know is named CODEMAID, which has a feature to remove unused references.
Just use codemaid to removed unused references, codemaid has other cool features like reformatting the code, code clean up, remove unused usings etc.
you can get codemaid from following location.
Jun 21, 2013 01:10 PM|nvielbig|LINK
Going to take a look at CodeMaid now, thanks for the tip.
Jun 21, 2013 01:33 PM|nvielbig|LINK
Kilshore, for some reason I cannot find within CodeMaid how to remove unused references? I see many other nice features like code cleaning, etc., but the reference removal I cannot find. Do you know where it is within VS2012? I ran CodeMaid Code Cleanup,
and saw it removing whitespaces, line shifting, and what not, but it doesn't seem like it did anything to the references, less i'm mistaken.
Jun 21, 2013 02:08 PM|Kishore Barik|LINK
Sorry, friend I messed with Resharper, actually resharper provide the feature to remove the un used references, and codemaid provide feature to clean the code by removing unused usings.
After installing resharper just right click on the references in Project in solutions explorer, there you will get the menu to removed un used references.
Link to resharper is
Jun 21, 2013 02:21 PM|Rion Williams|LINK
I personally would recommend Resharper for handling this (as well as countless other things that Resharper is great at). Within Resharper, you simply have to right-click on any of your Projects and
select the "Optimize References" option :
which will present you with a window displaying all of the unused References within your Project :
Resharper offers a free trial, however the full version is not free, but there are many other alternatives for handling this same functionality that you can see below :
Jun 21, 2013 03:14 PM|nvielbig|LINK
Kishore & Rion,
Thanks, after looking through CodeMaid (which cleaned well), and kind of deciding it wasn't capable of removing/optimizing references - I stumbled upon ReSharper which was highly rated. Glad to see you both recommend it for doing this. It should be very
helpful to me, especially as a beginner in most of all of this...