P4CONFIG
is an environment variable that you can use to
point to a file that stores other
Helix Core
environment variables. The current working directory and its parents are
searched for the file. If the file exists, then the variable settings
within the file are used.
P4CONFIG
makes it easy to switch
Helix Core
settings when switching between different solutions or projects. If you
place a configuration file in each of your client workspaces and set
P4CONFIG
to point to that file, your
Helix Core
settings change to the settings in the configuration files automatically
as you move from directories in one workspace to another.
To use P4CONFIG
to switch settings between client
workspaces on
P4VS, you must create
separate Visual Studio shortcuts for each workspace, setting the
Start in
property as the workspace directory (which is also
the directory where the configuration file resides). If you launch Visual
Studio using a shortcut defined this way,
P4VS
will read the
Helix Core
settings from the configuration file in that workspace’s directory. This
is required because Visual Studio otherwise uses its own directory as the
current working directory.
To use P4CONFIG
with
P4VS:
p4
, the
Helix Core
Command Line Client, unset the P4CLIENT
,
P4PORT
, and P4USER
environment variables and
set P4CONFIG
to the configuration file name.Create a Windows desktop shortcut for Visual Studio that is dedicated to the workspace with which you want to use the configuration file.
Repeat for each workspace for which you want a different configuration file.
For more information about P4CONFIG
and
Helix Core
environment variables, see the
P4 Command Reference
and
Setting P4VS preferences.