views:

380

answers:

9

At work, we are often working on multiple branches of our product at one time. For example, right now, we have a maintenance branch, a branch with code just going to QA, and a branch for a new major initiative, that won't be merged for some time now.

Our web project is set up to use IIS, so every time we switch to a different branch, we have to go in to IIS Admin and change the path on the virtual directory, then reset IIS, and sometimes even restart Visual Studio, to avoid getting build errors.

Is there any way to simplify this, other than not having our web project set up as a virtual directory? I'm not sure we want to make that change at this point. What do you do to make this easier, assuming you do this?

Corey

@RedWolves, virtual machines would definitely work, but I'm not sure it would be any simpler, especially for some of the other developers on my team, which is partly why I'm looking for more simplicity.

@Dan, we're not able to change source control providers, unfortunately.

@pix0r, that's something I'll try when I get back to work. Thanks for the suggestion.

@Haacked, I'll have to give that a try too, but I think we have some issues with why that won't work (I can't remember exactly why right now; this application was originally written in .Net 1.1, pre-Cassini, and I can't remember if we tried it when we upgraded to 2.0 or not).

Thanks all for the responses so far.

+2  A: 

I've found that using Cassini in development helps solve that problem. It's not an exact match for IIS, but it's close enough. Then you deploy to a stage environment and test with IIS. Hope that helps.

Haacked
A: 

I would suggest you use SVN with Tortoise SVN or CruiseControl.NET

GateKiller
+1  A: 

Im not entirely sure they 'simplify' things, but have you considered distributed source control, such as Git or mercurial?

Dan
+1  A: 

Our shop is getting into virtualization. So you could set up a server that has a VM of your development environment, clone it then for each branch. when you need to work on something else just load up that VM.

RedWolves
A: 

@RedWolves Separate VM's sounds like a very clean way to go. You could also set up each branch as its own application in IIS, right? Is the problem here that you need to work off of http://localhost/ with no subdirectory? If so, I would guess that it should be pretty easy to set up virtual hosts in IIS that point to "branch1.localhost" "branch2.localhost" etc, and set up your HOSTS file with these entries pointing to 127.0.0.1?

Something similar to this, but for IIS: Make XAMPP/Apache serve file outside of htdocs

pix0r
A: 

I would recommend the free utility http://www.jetstat.com/iisadmin/ as this allows you to setup multiple websites in IIS on XP Pro instead of being limited to just one. You can only run one website at any time but this allows you to setup the same structure website from localhost but pointing to whatever different paths for the root and virtual directories you need. You can then just stop and start the different websites to enable and disable your different branches.

I have multiple websites created locally for my DEV, ST, UAT and Live code bases pointing at the checked out source for each branch appropriately. I can then just start the correct website for the environment I need and then open up any of my VS website solutions. They just pickup the project files from the current website (environment) as this is always just localhost no matter which website you actually run. You can then stick with one lot of solution files and just need to remember which website you currently have running to know which code base you are actually working on.

Dave Anderson
A: 

Create a website and virtual directories in IIS like this:

Website: somednsentry.com

  • Virtual directory: maintenance
  • Virtual Directory: QA
  • Virtual Directory: MajorInitiative

You may need to create 3 different websites rather than virtual directories depending on .Net configurations and IIS versions.

This way you can point each virtual directory to a different file directory location and you can have Visual Studio publish to those file directories. Also browsing to http://somednsentry.com/QA has understandability benefits.

I would also highly recommend using an automated compile (aka build process) like visual build, final builder, or the others mentioned in these answers. The work it takes to get a build process up and running is well worth the time and quality payoff you get down the road. Some of the more modern applications also handle the IIS manipulation for you.

Solracnapod
A: 

Found this while looking for the exact same solution http://www.west-wind.com/Weblog/posts/682693.aspx Maybe of some use to you.

toxaq
A: 

We use a simple program which is accessible via the context menu in windows explorer. Once you get the latest version of your code to the folder of your choice you right click on the folder and click on the Change IIS virtual directory program.

the program creates a virtual directory if it does not exist and changes the virtual directory to point to the new folder. We have a simple winform with a list of virtual directories pulled from IIS so that we can choose which virtual directory to use with different projects.

skyfoot