4

I seem to have gotten a bit carried away with the number of libraries I'm referencing in a ASP.Net MVC web application I'm working on. Is there any tools or features already built into Visual Studio 2008/2010 which indicates to me which references I don't need?

Duncan
  • 1,758
  • 6
  • 21
  • 34
  • Remove them one at a time and compile. If you can't compile, it is needed. – Oded Jul 04 '10 at 16:22
  • @Oded. That's a bit tedious though especially having to add back in those you find you actually need. – Duncan Jul 04 '10 at 16:25
  • 1
    Guess you just learned a valuable lesson... I find that I only really learn such lessons if it hurts ;) – Oded Jul 04 '10 at 16:27
  • Or do it the other way around: remove all references, see what doesn't compile, add all required references for things that don't compile, and repeat. – Patrick Jul 04 '10 at 16:29

1 Answers1

1

See this older SO question and answer.

Resharper will do this for you, with its clean code context menu.

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009