Open topic with navigation
Use the Environment Variables page of project properties in Visual Studio to set project-specific environment variables used by Visual Studio development tools (including MSBuild). Settings on this page are written to the project file (project_name.synproj).
Settings on this page are specific to the current project, but there are circumstances where these settings may be available to other projects. See Environment bleed in Visual Studio for more information.
Settings on this page are not used for pre-build or post-build events.
For more information on setting environment variables, see Environment variables and Visual Studio development, and for information on setting environment variables that are available to multiple projects at development/build time, see Common Properties page of Visual Studio project properties.
With a traditional Synergy project, settings on this page are used to populate the Synergy tab of the Reference Manager dialog. See Referencing ELBs and OLBs for information.
To access this page, select a project node in Solution Explorer, select Project > Properties from the Visual Studio menu, and then select the Environment Variables tab.
The Project Environment Variables grid has the following columns:
Specifies the name of an environment variable that will be used when the project is built or when the project is run from Visual Studio.
Specifies the path for an environment variable. Enter a path in the Value column, or use the Select Folder button. If you use Select Folder, the currently highlighted environment variable will be set to the path for the folder you select.
You can use an environment variable in the definition of another environment variable. In the Value column, type the environment variable name followed by a colon (:). For example, in the following, the environment variables SYNERGYDE32 and ENV_VAR_2 are used to define ENV_VAR_1 and ENV_VAR_3:
Note that an environment variable used in the Value column must be available to the build process; it must be set in the environment, defined in the MSBuild project file (.synproj), or defined on this page. You can also use MSBuild properties, such as $(SolutionDir).
If an environment variable in the Value column is not available to the build process, it will be omitted from the definition. For example, if the above example didn't include a definition for ENV_VAR_2, and it wasn't otherwise available to the build, the ENV_VAR_3 environment variable would be set to \another_dir, which couldn't be used by the build or the application when launched from Visual Studio.