Prod and Dev Web App Branches

My fellow dotNetters, I need your advice on what should be a simple process that VS 2010 & IIS Express makes complicated.  I’m trying to keep a production branch and a dev branch on my laptop.  Yes, I know multiple branches are a pain in the butt, but it is a fact of life. 

The project is web forms (yes I know that MVC is cooler), VS 2010, IIS Express and SQL Server 2008.  So, I figured this would be an easy process when I do a production release:

  1. Check-in code & tag it in subversion
  2. Update my prod code directory from the tagged version in subversion.  Compile app and find what I didn’t check-in correctly.  I call this the oh-sh!t phase.
  3. Apply DB updates from local dev DB to local prod DB. 
  4. Run unit & smoke tests, aka, run nUnit.
  5. ProblemThe web app defined in the solution file & is tied to the port in the IIS Express config file, “C:\Users\[name]\Documents\IISExpress\config\applicationhost.config”.  So, even though there’s 2 separate physical paths on my laptop, the solution file is locked to a port in another config file.  Argh!
       1: Project("{E24C65DC-...}") = "localhost", "http://localhost:8082", "{ACF39ED5-...}"

       2:     ProjectSection(WebsiteProperties) = preProject

    You just have to “learn” that the port # in the solution file magically ties to the port # in the IIS Express config file.  Bleh. 

So intelligent fellows, how have you solved this situation?

Options that I thought about

  1. Use separate virtual machines – this just seems like overkill.  Why do I need a separate OS per code branch?  I want a more Java-ish solution that doesn’t require configs all over the place; I want a one-stop solution!
  2. Update the solution files – Yuck!  Each time I update the “prod” branch from the tagged prod version, I have to remember to go update the port # in the solution file.  Guess how often this will be forgotten…
  3. Maintain 2 solution files inside the project – Yucky, yuck!  The idea is to keep 2 solutions files; one for dev and one for prod.  Maybe worse than #2, because each time I add another project or other solution item, I have to update the other solution file.
  4. Please, please someone have a better idea!!!!!!!

 

What I’m doing now

I’m using option #2 above and it is painful.  I can test prod fixes in one branch and update the repository (trunk or branch) with the changes.  It isn’t a huge deal to remember to change the port in the solution, but I have to remember to NEVER check-in the prod branch solution file and each time I overwrite it, I have to manually edit it.  There just has to be a cleaner way.

About these ads

2 Responses to Prod and Dev Web App Branches

  1. jimmydlg says:

    This is posted here, and I have posted a work around as well, please visit the site and up the issue as well as indicate you can reproduce it. The more people who comment, the sooner microsoft will issue a fix:

    http://connect.microsoft.com/VisualStudio/feedback/details/734319/vs2010-iis-express-does-not-allow-branched-project-to-use-same-or-share-ports

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: