Web Project Dev Environment
A common problem projects have is when a new dev joins the team is they hopefully have to follow a bunch of instructions to set everything up. Most of the time, those instructions are out of date so another member of the team ends up setting everything up.
Depending on the complexity of the project, this can be quite time consuming.
The last project I was on was greenfields, so from day 1 we had a
Setup Dev Environment.ps1 file in the root of the project. This powershell script did the following:
- Installed IIS, and all the components we needed (windows auth, .net etc)
- Registered asp.net with IIS
- Created Websites with host headers for each of the sites in the project (we ended up having 3 different websites)
- Opened the HOSTS file in notepad (elevated) and printed out the lines you needed to paste into your HOSTS file
Over time, this script gained more and more features. But when a new team member joined the team, they just ran this script which installed/configured everything.
Why IIS you may ask, instead of say IIS Express. Well this approach means each site had it’s own domain, so fiddler works out of the box. It also means that our UI Test suite doesn’t have to fire up IIS Express to run it’s tests.