by Oliver
12. February 2011 11:17
Recently, while skimming my RSS feeds for a short read, I stumbled upon Phil Haack’s blog and his post Introducing RouteMagic. I’m not going into the details of that post right now (although to me it seems he’s written some interesting stuff about MVC and lately on Routing). I was just curious about his source code, so I went over to his Route Magic Codeplex site and looked at a commit with the interesting commit message Consolidated assembly info into a SolutionInfo.cs file and linked it to the two projects.
The above link leads to a page with diffs of a few files. The SolutionInfo.cs keeps the assembly information that is the same for all projects in a single file that we only need to link into every project (or at least every one that needs it). This is done by adding an existing item (Shift + Alt + A in Visual Studio 2010) with the option Add as Link (open the dropdown to see):
Now the SolutionInfo.cs will be compiled into the project. Of course, you should remove the entries that you put into the SolutionInfo.cs from the AssemblyInfo.cs in the same project.
We used to have two AssemblyInfo.cs files whose version numbers always needed to be in sync – now there’s only one file we have to edit: the SolutionInfo.cs.
Thanks, Phil Haack, and Happy Coding!
Oliver