views:

318

answers:

2

In our development environment each developer has their own dev server. Often times they do not actually develop on that server but develop from their local machine, deploy to their dev server, and then attach with the remote debugger to do debugging.

My question is; how can I use MSBuild to execute a different set of tasks for each user?

I want to enable each user to define their own build process with MSBuild tasks but I don't want that to necessarily affect the other developers. I also want a default set of tasks to execute if a given user explicitly defined their own process.

Example:

  • SomeProj.csproj
    • Default MS Build process is to copy to test server or staging server
    • Custom process for Steve is to copy to Steve's dev server
    • Custom process for Eric is to copy to Eric's dev server
+2  A: 

You could use the project user file (*.suo / *.user) to do some 'poor mans dependency injection'.

looks like this guy did something similar

slf
A: 

Yeah, I've done this before. Try trick is to key off $(USERNAME) in your msbuild script. If you haven't tried editing msbuild scripts before, you've got a lot of learning to do.

Jay Bazuzi