Option 1: You could just make the web.config
writeable locally without checking out (this would be helped by setting VS to prompt for checkout).
Option 2: Move the password out of the web.config. Using a configSource
attribute to put that configuration into a local, not in TFS, file. Each developer then maintains their own copy.
E.g. in web.config
:
<configuration>
...
<connectionStrings configSource="LocalConnectionStrings.config"/>
</configuration>
and in LocalConnectionStrings.config
:
<connectionStrings>
<add name="MyConnectionString"
connectionString="Data Source=.;Initial Catalog=Test1;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
NB. configSource
is implemented by ASP.NET's config runtime and is supported on all configuration elements for ASP.NET (and, thus, not for arbitrary (including custom) configuration elements).
(Also note the <linkedConfiguration> Element
provides anothe include mechanism, but is limited to assemblyBinding
element.)