Good architecture should be flexible and its too easy to screw up project by placing it in wrong physical folder. When dependencies grow, librarry becomes set in stone and no one is willing to move project and update relative paths in all projects.

When you see code smell you just fix or make it more readable and move on. What to do when you notice that projects are missplaced ? Well you probably will leave it as is, fixing it would be huge time sink.

To make these structure fixes easier I wrote dotnet tool that will move projects to correct folder. Correct folder being visual studio virtual directory.  And fix all (to my knowledge) paths, If I missed some just create pull request or raise GitHub issue.

 

Solution view

 SlnView.png

Before

├───DatabaseConnection
├───Helpers
│   └───MusicianLibrary
├───MusicLibrary
├───SpecialLibrary
└───StructurlFailure

After

├───DatabaseConnection
├───StructurlFailure
└───ThirdParty
    ├───MusicianLibrary
    ├───MusicLibrary
    └───SpecialFolder
        └───SpecialLibrary

 

Source code:  https://github.com/floatas/UPS

Download: https://www.nuget.org/packages/dotnet-ups

 

Check out my other projects
Active forks newsletter
Get a glimpse on open source active forks. Weekly newsletter with selection of repositories and their active forks.

Comments


Comments are closed