Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 350627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:34:03+00:00 2026-05-12T11:34:03+00:00

How can I find and delete unused references in my projects? I know you

  • 0

How can I find and delete unused references in my projects?

I know you can easily remove the using statements in vs 2008, but this doesn’t remove the actual reference in your projects. The referenced dll will still be copied in your bin/setup package.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:34:03+00:00Added an answer on May 12, 2026 at 11:34 am

    *Note: see http://www.jetbrains.net/devnet/message/5244658 for another version of this answer.

    Reading through the posts, it looks like there is some confusion as to the original question. Let me take a stab at it.

    The original post is really asking the question: “How do I identify and remove references from one Visual Studio project to other projects/assemblies that are not in use?” The poster wants the assemblies to no longer appear as part of the build output.

    In this case, ReSharper can help you identify them, but you have to remove them yourself.

    To do this, open up the References inth Solution Browser, right mouse click on each referenced assembly, and pick “Find Dependent Code”. See:

    http://www.jetbrains.com/resharper/features/navigation_search.html#Find_ReferencedDependent_Code

    You will either get:

    1. A list of the dependencies on that Reference in a browser window, or

    2. A dialog telling you “Code dependent on module XXXXXXX was not found.”.

    If you get the the second result, you can then right mouse click the Reference, select Remove, and remove it from your project.

    While you have to to this “manually”, i.e. one reference at a time, it will get the job done. If anyone has automated this in some manner I am interested in hearing how it was done.

    You can pretty much ignore the ones in the .Net Framework as they don’t normally get copied to your build output (typically – although not necessarily true for Silverlight apps).

    Some posts seem to be answering the question: “How do I remove using clauses (C#) from a source code file that are not needed to resolve any references within that file”.

    In this case, ReSharper does help in a couple ways:

    1. Identifies unused using clauses for you during on the fly error detection. They appear as Code Inspection Warnings – the code will appear greyed out (be default) in the file and ReSharper will provide a Hint to remove it:

      http://www.jetbrains.com/resharper/features/code_analysis.html#On-the-fly_Error_Detection

    2. Allows you to automatically remove them as part of the Code Cleanup Process:

      http://www.jetbrains.com/resharper/features/code_formatting.html#Optimizing_Namespace_Import_Directives

    Finally, realize that ReSharper does static code analysis on your solution. So, if you have a dynamic reference to the assembly – say through reflection or an assembly that is dynamically loaded at runtime and accessed through an interface – it won’t pick it up. There is no substitute for understanding your code base and the project dependencies as you work on your project. I do find the ReSharper features very useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All I can find using fopen() and fwrite() in C is to delete all
I can find many examples on how to do this in managed c++ but
I can easily select all comments from XML by select @XML.query('comment()') but can't find
How can i find substrings inside string and then remember and delete it when
Can you help me to find trouble with my code? It has to delete
I can't seem to find it anywhere... How do I delete/destroy/reset/empty/clear a user's session
I can find the JS and HTML code in response by alert() . But
With following query I can find the data I want to delete: SELECT ab.id,
I know that this question has been asked multiple times already , but I
Possible Duplicate: Find the smallest unused number in SQL Server I have this table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.