I have a software project which consists of multiple Project files and multiple Solution files. The Solution files have a one-to-many relationship with the Project files, and a given Project file may appear in multiple different solution files.
Is there any good/spiffy way to come up with a map of the relationships between the Solution files and the Project files? Either through VS or a utility of some sort.
What I’d like to do is say ‘hey, in this directory and its subdirectories there are a number of Solution files and Project files – please tell me which Solutions use which Projects and map it out for me’
I realize the net effect could be produced by opening up every Solution file and inspecting it but I’m looking for an automated, repeatable action.
EDIT: I’m afraid I also have Solution/Project combos dating back to VS2003, so I need to map those as well.
Both project files and solution files are text files. Project files don’t know about their solution, so we’ll have to look in the solutions for their projects.
A project entry in the solution file looks like this:
So you can see, we can grab the project name and the relative path to the project file.
Using your favorite scripting language you could do something like the following. (Example in ruby)