Unless otherwise noted, all settings here apply to both cpc.exe.config and tfc.exe.config. If a default value is not specified, then there is no default value.

Creating the config file

To create the config file, make a new file named cpc.exe.config (of tfc.exe.config, for tfc.exe) in the same directory as cpc.exe (or tfc.exe). It should contain the following text:

<configuration>
    <appSettings>
        <add key='...' value='...' />
        <add key='...' value='...' />
    </appSettings>
</configuration>

Environmental Overrides

For each configuration file element, there is a corresponding environment variable that can also be set. When the environment variable is set, it takes precedence over the configuration file element. This allows multiple users on the same box to set and override any of the default configuration values.

Note: environmental overrides were introduced in build 10127. Previous builds do not support this feature.

Table of Contents

Commonly Set Options

Rarely Set Options

DefaultToGuiForCommit

Environmental override: CpcDefaultToGuiForCommit (cpc.exe), TfcDefaultToGuiForCommit (tfc.exe)
Default value: false (both)

Set this value to true and the "commit" command will use the GUI by default.

Sample:
<add key='DefaultToGuiForCommit' value='true'/>

DefaultToGuiForStatus

Environmental override: CpcDefaultToGuiForStatus (cpc.exe), TfcDefaultToGuiForStatus (tfc.exe)
Default value: false (both)

Set this value to true and the "status" command will use the GUI by default.

Sample:
<add key='DefaultToGuiForStatus' value='true'/>

Diff and Merge tool settings

Environmental overrides: CpcDiffTool, CpcDiffArgs, CpcMergeTool, CpcMergeArgs (cpc.exe), TfcDiffTool, TfcDiffArgs, TfcMergeTool, TfcMergeArgs (tfc.exe)

DiffTool and DiffArgs allows you to configure a graphical diff tool to be used for status /gui and commit /gui.

MergeTool and MergeArgs allows you to configure a graphical merge tool to be used for status /gui and commit /gui.

DiffTool and MergeTool should point to the executable. DiffArgs and MergeArgs are the arguments passed to the executable. The following values are available for the arguments:

Token Meaning
{basepath} Full path to base filename
{mypath} Full path to my changes
{theirpath} Full path to their changes (merge only)
{mergepath} full path for merge output (merge only)
{basename} descriptive text of base filename
{myname} descriptive text of my filename
{theirname} descriptive text of their filename (merge only)
{mergename} descriptive text of merge filename (merge only)


If DiffTool or DiffArgs is omitted, then diffing from the status and commit GUIs is not supported.
If MergeTool or MergeArgs is omitted, then merging from the status and commit GUIs is not supported.

Sample for Araxis Merge:
<add key='DiffTool'
 value='C:\Path\To\compare.exe'/>
<add key='DiffArgs'
 value='/wait /2 /title1:{basename} /title2:{myname} {basepath} {mypath}'/>
<add key='MergeTool'
 value='C:\Path\To\compare.exe'/>
<add key='MergeArgs'
 value='/wait /swap /a3 /3 /title1:{theirname} /title2:{myname} /title3:{basename}
    {theirpath} {mypath} {basepath} {mergepath}'/>

Sample for Beyond Compare 2.x: (only supports 2-way merging)
<add key='DiffTool'
 value='C:\Path\To\bc2.exe'/>
<add key='DiffArgs'
 value='{basepath} {mypath} /title1={basename} /title2={myname}'/>
<add key='MergeTool'
 value='C:\Path\To\bc2.exe'/>
<add key='MergeArgs'
 value='{basepath} {mypath} /title1={basename} /title2={myname}'/>

Sample for KDiff3:
<add key='DiffTool'
 value='C:\Path\To\kdiff3.exe'/>
<add key='DiffArgs'
 value='{basepath} --fname {basename} {mypath} --fname {myname}'/>
<add key='MergeTool'
 value='C:\Path\To\kdiff3.exe'/>
<add key='MergeArgs'
 value='{basepath} --fname {basename} {mypath} --fname {myname} {theirpath}
    --fname {theirname} -o {mergepath}'/>

Sample for SourceGear DiffMerge:
<add key='DiffTool'
 value='C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe'/>
<add key='DiffArgs'
 value='/t1={basename} /t2={myname} {basepath} {mypath}'/>
<add key='MergeTool'
 value='C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe'/>
<add key='MergeArgs'
 value='/m /t1={theirname} /t2={myname} /t3={basename} {theirpath} {mypath} {basepath} /r={mergepath}'/>

Sample for TFS Team Explorer:
<add key='DiffTool'
 value='C:\Path\To\diffmerge.exe'/>
<add key='DiffArgs'
 value='{basepath} {mypath} {basename} {myname} /ignorespace'/>
<add key='MergeTool'
 value='C:\Path\To\diffmerge.exe'/>
<add key='MergeArgs'
 value='/merge {theirpath} {mypath} {basepath} {mergepath} {theirname} {myname}'/>

Sample for TortoiseMerge:
<add key='DiffTool'
 value='C:\Path\To\TortoiseMerge.exe'/>
<add key='DiffArgs'
 value='/base:{basepath} /mine:{mypath} /basename:{basename} /minename:{myname}'/>
<add key='MergeTool'
 value='C:\Path\To\TortoiseMerge.exe'/>
<add key='MergeArgs'
 value='/base:{basepath} /mine:{mypath} /theirs:{theirpath} /basename:{basename}
    /minename:{myname} /theirsname:{theirname} /merged:{mergepath} /mergedname:{mergename}'/>

Sample for WinDiff: (does not support merging)
<add key='DiffTool'
 value='C:\Path\To\WinDiff.exe'/>
<add key='DiffArgs'
 value='{basepath} {mypath}'/>

Sample for WinMerge: (only supports 2-way merging)
<add key='DiffTool'
 value='C:\Path\To\WinMerge.exe'/>
<add key='DiffArgs'
 value='/ub /dl {basename} /dr {myname} {basepath} {mypath}'/>
<add key='MergeTool'
 value='C:\Path\To\WinMerge.exe'/>
<add key='MergeArgs'
 value='/ub /dl {theirname} /dr {myname} {theirpath} {mypath} {mergepath}'/>

Editor

Environmental override: CpcEditor (cpc.exe), TfcEditor (tfc.exe)
Default value: notepad.exe (both)

The Editor value specifies the text editor to be used for editing the commit message, when running commit without the /gui option.

Note: If an editor is not configured via the standard environment variables or the configuration file, the EDITOR and VISUAL environment variables are consulted before defaulting to notepad.exe.

Sample:
<add key='Editor' value='notepad.exe'/>

IgnoreFile

Environmental override: CpcIgnoreFile
Default value: .tfs-ignore (both) (default added in build 10144)

IgnoreFile specifies the file name where ignore information is gathered from.

Ignore files are XML files which describe which files should be ignored during an implicit add operation (for both "add" of a directory with /recursive and "syncup"). They support recursion. They should be checked into your source tree so they are shared among the all the developers.

An ignore file can list ignore delete and add operations. Deletes are used to remove ignores from parent directories. Add operations can be local-only or recursive.

Sample ignore file:
<ignore xmlns='http://www.codeplex.com/schema/IgnoreListSchema-1.0.xsd'>
  <delete>foo</delete>
  <add recursive='true'>bar</add>
  <add>baz</add>
</ignore>

Delete operations must be listed before add operations. Add operations by default are local-only unless overridden with recursive='true'. Wildcards are supported (* and ?).

We use a .tfs-ignore file like this in the root of our project:

Sample ignore file:
<ignore xmlns='http://www.codeplex.com/schema/IgnoreListSchema-1.0.xsd'>
  <add recursive='true'>bin</add>
  <add recursive='true'>obj</add>
  <add recursive='true'>_Resharper*</add>
  <add recursive='true'>*.resharper</add>
  <add recursive='true'>*.suo</add>
  <add recursive='true'>*.user</add>
  <add>*.xml</add>
</ignore>

See IgnoreFileScheme-1.0.xsd for the schema of the XML file.

If IgnoreFile is omitted, ignore files are not supported.

Sample:
<add key='IgnoreFile' value='.tfs-ignore'/>

AnonymousUsername

Environmental override: CpcAnonymousUsername (cpc.exe)
Default value: anonymous (cpc.exe)
Introduced: Build 10127

All read-only operations are initially attempted with this username and an empty password, to support anonymous access to the CodePlex source control repository.

Sample:
<add key='AnonymousUsername' value='anonymous'/>

CodePlexWebServiceUrl

Environment override: CpcCodePlexWebServiceUrl (cpc.exe)
Default value: http://www.codeplex.com/services/ProjectInfoService.asmx (cpc.exe)
Introduced: Build 10127

Points to the CodePlex project information web service, which is used to translate project names into TFS server information, as well as translate CodePlex usernames into TFS domain usernames.

Sample:
<add key='CodePlexWebServiceUrl' value='http://www.codeplex.com/services/ProjectInfoService.asmx'/>

ForceBasicAuth

Environmental override: CpcForceBasicAuth (cpc.exe), TfcForceBasicAuth (tfc.exe)
Default value: true (cpc.exe), false (tfc.exe)
Introduced: Build 10127

Setting to 'true' causes authentication to always happen with basic authentication. This is necessary for CodePlex anonymous user support. This is a safe setting for the CodePlex TFS servers, because they require SSL.

Warning: Setting this to 'true' on tfc.exe could cause your credentials to be sent in the clear over the Internet, so use this setting with extreme caution!

Sample:
<add key='ForceBasicAuth' value='true'/>

TryDefaultCredentials

Environmental override: TfcTryDefaultCredentials (tfc.exe)
Default value: true (tfc.exe)
Introduced: Build 10127

When set to 'true', the logged in user credentials are tried when there are no cached credentials for the server. This allows tfc.exe to work against intranet TFS servers with domain authentication without prompting for credentials. If set for 'false', then the user is prompted for credentials without trying the logged in user credentials.

Sample:
<add key='TryDefaultCredentials' value='true'/>

Last edited Sep 3, 2007 at 12:50 PM by BradWilson, version 6

Comments

stimpy77 May 16, 2010 at 8:19 AM 
Needs coverage of Beyond Compare 3.x.

coffeeCoder Dec 21, 2007 at 1:48 AM 
All this to give away free code?