Visual Studio Add-In: Reference Sentinel
Posted by Dan Vanderboom on December 20, 2007
My article on Project Reference Oddness has been the most popular so far. I like seeing the blog statistics, and I’m constantly observing the search terms people use to get to my blog. I guess I shouldn’t have been surprised by the number of people having problems with references and searching for answers online. It’s a pretty messed up system.
I’ve been contemplating writing an add-in for Visual Studio that would track and manage references, set some rules, and enforce them. I’d like to be able to specify that I use v3.1 of Library X across all projects in a solution. I’d then like to be able to make a change in one place (like a Reference Explorer) and have it update all projects in the solution. If one of the references changes outside of this system (for whatever reason), it should act as a sentinel, detecting the change and changing it back to what you defined in the Reference Explorer. (It should also notify you that this has happened to help troubleshoot the root cause.)
It could also set reference paths. By saving this information as an extension to the solution file, it could be checked into source control and shared with the rest of your development team. This should eliminate the warnings and errors you get when you accidentally reference different versions of the same assembly. It would also reduce the pain of creating a new branch or pulling code down to a new machine and having to spend a bunch of time setting the reference paths over and over again.
Am I missing anything? What other reference pains could be alleviated?