You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/msbuild/property-functions.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Use property functions to call .NET methods
3
3
description: Use property functions to call .NET methods that appear in MSBuild property definitions, and see examples for working with the properties and methods.
4
-
ms.date: 04/29/2024
4
+
ms.date: 6/4/2025
5
5
ms.topic: how-to
6
6
helpviewer_keywords:
7
7
- MSBuild, property functions
@@ -12,7 +12,9 @@ ms.subservice: msbuild
12
12
---
13
13
# Property functions
14
14
15
-
Property functions are calls to .NET methods that appear in MSBuild property definitions. Unlike tasks, property functions can be used outside of targets. Property functions are evaluated whenever the properties or items get expanded. So, for properties and items outside of any targets, property functions are evaluated before any target runs. For property groups and item groups inside targets, property functions are evaluated when the target is evaluated.
15
+
Property functions are calls to .NET methods that appear in MSBuild property definitions. You typically use them to construct property definitions that require more complex logic.
16
+
17
+
Unlike tasks, property functions can be used outside of targets. Property functions are evaluated whenever the properties or items get expanded. So, for properties and items outside of any targets, property functions are evaluated before any target runs. For property groups and item groups inside targets, property functions are evaluated when the target is executed.
16
18
17
19
Without using MSBuild tasks, you can read the system time, compare strings, match regular expressions, and perform other actions in your build script. MSBuild will try to convert string to number and number to string, and make other conversions as required.
18
20
@@ -128,6 +130,9 @@ In addition, you can use the following static methods and properties:
0 commit comments