Add and Remove list of references the ultra simple way
When you use VS to initially create a project based on any of the several templates available like Class Library, WPF Application, Web Application, Office Addin and the list goes on, you already get some of the basic ‘must have’ references for your project automatically added thanks to the templating mechanism, i.e. you get PresentationCore.dll et friends added to your project every time you create a WPF-based project.
Now this is good only as a starting skeleton. You will have to add a few more assemblies as soon as you start coding.
Some of them will be core .NET fx references that the template just didn’t add (i.e. you’ve a WPF based app where you need to use some WinForms bit or viceversa) and some of them will probably include some 3rd party framework you may be using (i.e. log4net, NHibernate, etc).
This adding of references can get a bit tedious over time as you find yourself adding the same set of references over and over again… every time you create a new project…
Even if you’re using the super-cool Search References from which you can easily search and add multiple references with a few clicks, this is still far from being ideal… ideal would be to say add my “Commonly used web stuff” or add my “log4net and NHibernate” (in a single shoot!).
Enter the free World of VS Reference Lists extension. (yes, free, go download it here).
Let’s create a new Web Application project and see how the “References” node looks like:
Let’s now use the ultra cool Search References extension to filter the list of available references to those that start with “system.web” and select the following four assemblies which are not added by default by VS and we supposedly used in every Web App project we develop:
Once we have added these references we will create a named list to group them together:
(Note how the extension is clever enough to find a common prefix for all selected assemblies and offer us “System.Web” as the name for the list to be created)
We won’t choose the “System.Web” suggested name as we want to have a more personalized list name…
We’ve just created our list that we can now use in any other Web App project where these references haven’t been added yet:
The extension also makes it very easy to manage existing lists, let’s say we mistakenly included “System.Web.Routing.dll” to our list, just click on it and remove it from our list:
Pretty cool extension, ugh?
You can download it for free and start creating your list of references today!
And if you would like to have Microsoft to include such a feature in the next version of Visual Studio be sure you vote this suggestion in Connect.