Rants, rambles, news and notes from another geek

Create the Solution Before Adding Projects

Korby Parnell writes:

Here’s my Source Control Tip of the Week:&nbsp_place_holder;

«Create a blank solution before creating&nbsp_place_holder;a project.»

In&nbsp_place_holder;Web Projects and Source Control Integration in Visual Studio .NET,&nbsp_place_holder; I state that doing so will, “_ …improve the long-term manageability and discoverability of your projects_ [and] maintain a close symmetry between local project files and their master copies on the source control server.”

I couldn’t agree more. Even when you aren’t using Source Control Integration you should follow this guideline. Unless I know I am creating a one-off Spike Solution, I always create a blank solution first.

As Korby shows, it is the only way to ensure that you get a parent solution folder containing child project folders. This is a good thing whether you are using the VS.NET Source Control stuff or not. I use CVS these days and it makes me a lot happier to have my folders structured this way.

Another thing that I do that I don’t think many other people do (except Brad Wilson) is to create my web projects as Class Libraries instead of ASP.NET Projects. By doing this, you get to keep the source files in the normal project file tree instead of over in the wwwroot folder. With a little bit of tweaking you can debug just fine, add all the same kinds of project files, etc. Works like a charm. (Thanks to Brad for suggesting it.)