Source Control, VS 2005, and ASP.NET

By ecliptic

For those who have not been able to figure out why they can’t get their solutions into Source Safe with a neat folder structure.. here’s your solution. Of course, everything works KINDA ok whenever you use all defaults for where your website is located at, but if you’re any kind of developer and you have source control, you will want to create the same directory structure as your source control delegates (for web apps anyways).

By default 2003 creates the correct folder heiarchy and defaults your web application location to your local machine’s inetpub directory (even though this is bad – *spank*). VS 2005, on the other hand, puts your solution two folders above your projects and puts those files all over your Documents and Settings/LocalUserName/ blah blah.

Well, let’s say you create your web application in C:\Dev\Websites. Open it in VS 2005 and you’ll notice there’s no solution.. hmmmm… Add another project and it instantly appears. Rather than blogging all the stuff that VS 2005 sets up that doesn’t play nice with SS… I’ll just post a solution.

Create your folder heiarchy as follows:

Solution Folder -> (.sln) -> Web Project Folder -> (.aspx, .cs, etc…)

If you have multiple projects, then create a new folder (VS 2005 should create one by default once you save your solution correctly) for your project and put it in the same branch as your Web Project Folder. Ridiculous? Wait until you try to create a .msi file. Of course, this process is great facilitated with the Web Deployment Projects download from MS…. but mum’s the word.

Leave a Reply