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:

Folders1

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:

Folders2

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

Folders3

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

Folders4

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

Folders5

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s