Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Remove unused references
8 replies. Latest Post by GearWorld on October 8, 2009.
(0)
GearWorld
Participant
846 points
1,105 Posts
10-07-2009 7:03 AM |
Hi,
Who know the best and easiest way to remove all the unused references when you have a big solution with a lot of projects ?I'm not talking about just the using here but really the references in a project or even better if we could do that in one shot, at the solution level which could remove all the unsued references.
Sergey.L...
Contributor
7202 points
1,342 Posts
10-07-2009 7:13 AM |
Look http://msdn.microsoft.com/en-us/library/7sfxafba.aspx
Sledge70
5882 points
1,042 Posts
10-07-2009 7:18 AM |
Have you tried using resharper before? www.jetbrains.com
This will show you at least which using statements are redundant.
As for references the only thing I can think of is a tool called www.buildmanager.net that shows you the dependency hierarchy on a project by project basis. Not sure if it'll help removing unused ones though.
10-07-2009 5:08 PM |
There's nothing in there that works. It's a Silverlight project, I don't have any MyProject or program.cs or whatever
there's no unused references in any VS 2008 menus
Good try :)
10-07-2009 5:09 PM |
Sledge70: Have you tried using resharper before? www.jetbrains.com This will show you at least which using statements are redundant. As for references the only thing I can think of is a tool called www.buildmanager.net that shows you the dependency hierarchy on a project by project basis. Not sure if it'll help removing unused ones though.
No thanx I already paied so much for VS 2008 I don't want to pay again for something I'm using just once every year
10-07-2009 5:20 PM |
Resharper has a trial version.
10-08-2009 10:14 AM |
I tried it. It does't have the feature of removing the unused referencesnor the one I would like most also which is to encapsulate multiple fields at once.
10-08-2009 10:25 AM |
There isn't any tool out there that will do this for you automatically.
The only ones I've seen will help you determine if references are used but won't tidy up for you.
If you remove unused using statements the compiler won't link in any unreferenced assemblies. I have a feeling that even the unused usings are detected by the compiler. I'll have to check a few manifest files for some click once apps I have as that will show for sure whether unused assemblies are excluded by the compiler.
10-08-2009 12:53 PM |
I see