Skip to content

vchistov/ref-assistant-legacy

Repository files navigation

Reference Assistant (student project)

WARNING

This project was developed at 2011 and originally hosted by codeplex. I'm not working on the project anymore.

Project Description

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:

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages