c# - How can I let each dev have their own, private, web.config? -


consider bunch of developers working on asp.net web application. each dev has private copy of db, running on private, local db engine each dev has different connection string.

currently, each dev has web.config modified connection string , 1 of these modifications gets committed source control, not good.

how can both have default web.config in source control , let each dev have own private copy ignored source control? (i prefer solution avoids web.config transformation files if possible, syntax bit opaque).

there couple of things can help.

  1. enforce convention followed developers. instance, sql server instance name, database name etc should same on developers machines don't need change them. file location kind of settings should respective project or system location. overall idea keep settings developers need not checkout , change anything.

  2. in cases, enforcing above might not possible. in scenario, can move changing settings different file , refer in web.config using 'configsource'. developers can change settings file per local machine environment. in case ensure not in team can checkin file prevent unwanted overriding.

hope helps.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -