Utility to generate solution files can now create solution folders

If somebody wants more from the program you wrote, it’s a good sign. It means that at last you did something useful :-)

Recently my colleague mentioned that the utility that I wrote to generate project solution file should support creation of solution folders. Our development team has in total more than 200 projects, and grouping them within the solution makes a lot of sense.

So I extended the tool, and you can specify number of solution folder levels using “/l” command line switch.

GenerateSolutionFile /p <path> /s <solution> [/i includeFilter] [/e excludeFilter] [/l [*]solutionFolderLevels]

You can specify solution folder levels using an integer number – project names will be split using “.” as separator, and resulting words will be used as solution folder names. Since it’s a good practice to start project name with a name of the company that won’t be useful as a solution folder, it’s possible to skip common project prefix by using an asterisk letter in front of the number specifying the number of levels.

Here are a few examples. If you generate solution file without instructing the tool to create solution folders, you will get a flat structure of projects:


If you add a command line switch “/l 1”, then the program will extract a first word from compound project names and create a root solution folder:


You can add number of levels with “/l 2” switch:


To skip “MyCompany” from solution folder tree add an asterisk when specifying number of folder levels: “/l *1”:


And of course you can increase number of levels, here’s how it looks when using “/l *2” switch:



One thought on “Utility to generate solution files can now create solution folders”

  1. Hi Tony, and sorry for a delay with my reply.

    Can you give me some brief example of a solution and what would be an output of the tool. I must say I am still not sure that what you’re suggesting is applicable to Solution Maker that is just a tool to generate SLN files. It scans projects, optionally find recursive dependencies but also on project file level. So perhaps if you take an example from your practice: a set of projects, referenced DLLs etc. and indicate what would be the resulting solution for them, I can understand better what can be improved in Solution Maker that I plan to keep matching its name: a solution file generation utility.

    Best regards

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>