Project Description
 
Reference Assistant for Visual Studio 11
Reference Assistant is free, open source tool to remove unused references from C#, F#, VB.NET or VC++/CLI projects in the Visual Studio 2010/11. It's developed in C#.

Quick Information

Often a .NET project has some references that are not used by any types of its project.When creates new project, the Visual Studio adds several assemblies by default. Types from these assemblies can be used in the future. How to detect what assembly reference is useful and what is not? Simplest way checking the used types. But what if a project is so big? Well it is possible to check an assembly manifest. Yes, assemblies references which are required for runtime will be included in the manifest. But there is one more problem. The assembly can be required indirectly. For example, if you use some type then all assemblies containing definitions of its base types (classes and interfaces from type's hierarchy) should be in a project's references. It is just one example. The Reference Assistant checks several criterions to decide to remove assembly reference or not:
 
Reference Assistant for Visual Studio 2010
  • checks a project assembly's manifest (for VC++/CLI doesn't check);
  • checks the hierarchy of used classes;
  • checks the hierarchy of used interfaces;
  • checks the used attributes and their parameters types;
  • checks the forwarded types(some type can be moved from one assembly to another);
  • checks the imported types (e.g. COM types);
  • checks the used members of types (methods, properties, fields, events) and them parameters types;
  • checks the types declared in XAML (Silverlight, WPF, Workflow 4.0, Windows Phone)

The Reference Assistant uses the Mono.Cecil library for reading assembly metadata.

Visual Studio Gallery

The Reference Assistant is available for downloading on the Visual Studio Gallery:
Prerequires for Developers

If you want to change the Reference Assitant's source code for yourself and to compile it after that, you need to install Visual Studio SDK. You can download it there:

Last edited May 9, 2012 at 7:58 PM by vchistov, version 13