Skip to content

Commit 4b1ef76

Browse files
Merge pull request #14169 from MicrosoftDocs/ghogen-patch-286190
Review and update
2 parents 8f975c0 + f5e49d4 commit 4b1ef76

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/msbuild/how-to-use-environment-variables-in-a-build.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Use Environment Variables in a Build'
33
description: Work with environment variables in MSBuild project files, and use environment variables to set build options without modifying the project file.
4-
ms.date: 08/14/2024
4+
ms.date: 8/5/2025
55
ms.topic: how-to
66
helpviewer_keywords:
77
- environment variables, referencing
@@ -14,11 +14,11 @@ ms.subservice: msbuild
1414
---
1515
# Use environment variables in a build
1616

17-
When you build projects, it is often necessary to set build options using information that is not in the project file or the files that comprise your project. This information is typically stored in environment variables.
17+
When you build projects, it's often necessary to set build options using information that isn't in the project file or the files that comprise your project. This information is typically stored in environment variables.
1818

1919
## Reference environment variables
2020

21-
All environment variables that are valid MSBuild property names are available to the Microsoft Build Engine (MSBuild) project file as properties. Valid property names are described in [MSBuild properties](msbuild-properties.md). For example, environment variables that begin with a number are not available in MSBuild.
21+
All environment variables that are valid MSBuild property names are available to the MSBuild project file as properties. Valid property names are described in [MSBuild properties](msbuild-properties.md). For example, environment variables that begin with a number aren't available in MSBuild.
2222

2323
> [!NOTE]
2424
> If the project file contains an explicit definition of a property that has the same name as an environment variable, the property in the project file overrides the value of the environment variable.
@@ -29,11 +29,11 @@ When you build projects, it is often necessary to set build options using inform
2929

3030
`<FinalOutput>$(BIN_PATH)\MyAssembly.dll</FinalOutput>`
3131

32-
You can use a `Condition` attribute to provide a default value for a property if the environment variable was not set.
32+
You can use a `Condition` attribute to provide a default value for a property if the environment variable wasn't set.
3333

3434
#### To provide a default value for a property
3535

36-
- Use a `Condition` attribute on a property to set the value only if the property has no value. For example, the following code sets the `ToolsPath` property to *c:\tools* only if the `ToolsPath` environment variable is not set:
36+
- Use a `Condition` attribute on a property to set the value only if the property has no value. For example, the following code sets the `ToolsPath` property to *c:\tools* only if the `ToolsPath` environment variable isn't set:
3737

3838
`<ToolsPath Condition="'$(TOOLSPATH)' == ''">c:\tools</ToolsPath>`
3939

0 commit comments

Comments
 (0)