My suggestion would be to use one of two ways:
A ConnectionStrings.config or Web.Config Conversion . As usual, there are pros and cons for both.
Using a separate configuration file for connection strings
- Each developer can have a local copy of their connection strings.
- ConnectionStrings can be flagged for ignore and never tied to the source control.
However - Requires individual management of each client / developer.
Convert Web.config
- Each connection / assembly string configuration can be source controlled.
- Requires publishing an application, not just building
but
- It can be difficult to maintain with a lot of conversions.
Personally, I prefer to have ConnectionStrings.config - I don't like having production credentials in the source control. This also has a good side effect giving a build error if you forget it, so you cannot leave them by mistake.
source share