Skip to main content

Microsoft Silverlight

Answered Question Remove unused referencesRSS Feed

(0)

GearWorld
GearWorld

Participant

Participant

846 points

1,105 Posts

Remove unused references

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.Lutay
Sergey.L...

Contributor

Contributor

7202 points

1,342 Posts

Re: Remove unused references

Hi,

Look http://msdn.microsoft.com/en-us/library/7sfxafba.aspx

(If this has answered your question, please click on "mark as answer" on this post. Thank you!)

Blog

Twitter

Sincerely,
Sergey Lutay

Sledge70
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Re: Remove unused references

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.

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight

GearWorld
GearWorld

Participant

Participant

846 points

1,105 Posts

Re: Remove unused references

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 :)

 

GearWorld
GearWorld

Participant

Participant

846 points

1,105 Posts

Re: Remove unused references

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

 

Sledge70
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Re: Re: Remove unused references

Resharper has a trial version.

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight

GearWorld
GearWorld

Participant

Participant

846 points

1,105 Posts

Re: Re: Remove unused references

I tried it.  It does't have the feature of removing the unused references
nor the one I would like most also which is to encapsulate multiple fields at once.

 

Sledge70
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Answered Question

Re: Re: Re: Remove unused references

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.

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight

GearWorld
GearWorld

Participant

Participant

846 points

1,105 Posts

Re: Re: Re: Re: Remove unused references

I see

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities