In a .NET project, say you have a configuration setting – like a connection string – stored in a app.config file, which is different for each developer on your team (they may be using a local SQL Server, or a specific server instance, or using a remote server, etc).
How can you structure your solution so that each developer can have their own development ‘preferences’ (i.e. not checked into source control), but provide a default connection string that is checked into source control (thereby supplying the correct defaults for a build process or new developers).
Edit: Can the ‘file‘ method suggested by @Jonathon be somehow used with the connectionStrings section?
AppSettings can be overridden with a local file:
This allows for each developer to keep their own local settings.
As far as the connection string, in a perfect world all developers should connect to a test DB, not run SQL Server each.
However, I’ve found it best to keep a file named Web.Config.Prd in source control, and use that for build deployments. If someone modifies web.config, they must also add the change to the .PRD file…There is no good automation there 🙁