views:

19

answers:

1

We've got several devs working on a project and they keep checking their web.configs in with their own connection strings which is a pain.

Is there a way to kick off the TransformWebConfig task on a local machine when we do F5 debug? I've made a new configuration for my local machine but I can't figure out how to hack in the TransformWebConfig task.

Or is there a better way to isolate connection strings between dev machines?

Thanks in advance

+1  A: 

I investigated this issue before, but found no way to do this. Here is the SO link with an answer, including the reasons why this won’t work.

Second part of your question – better ways of isolating connection strings: In my view there are different approaches

  • configSource for connection strings and build-actions to copy the developer versions into the right places
  • web transformations + remote debugging with a fake deployment to a local IIS server
  • a central database server for testing, to keep the developers connection strings constant
Dirk