Skip to content

Commit 3f7364a

Browse files
authored
Merge pull request #111 from cdmihai/patch-1
Update msbuild's property functions
2 parents d56c3ea + 4889f6b commit 3f7364a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/msbuild/property-functions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ In the .NET Framework versions 4 and 4.5, property functions can be used to eval
9494

9595
- System.Math
9696

97+
- System.Runtime.InteropServices.OSPlatform
98+
99+
- System.Runtime.InteropServices.RuntimeInformation
100+
97101
- System.UInt16
98102

99103
- System.UInt32
@@ -190,6 +194,15 @@ In the .NET Framework versions 4 and 4.5, property functions can be used to eval
190194
|int BitwiseAnd(int first, int second)|Perform a bitwise `AND` on the first and second (first & second).|
191195
|int BitwiseXor(int first, int second)|Perform a bitwise `XOR` on the first and second (first ^ second).|
192196
|int BitwiseNot(int first)|Perform a bitwise `NOT` (~first).|
197+
|bool IsOsPlatform(string platformString)|Specify whether the current OS platform is `platformString`. `platformString` must be a member of `OSPlatform`.|
198+
|bool IsOSUnixLike|True if current OS is a Unix system.|
199+
|string NormalizePath(params string[] path)|Gets the canonicalized full path of the provided path and ensures it contains the correct directory separator characters for the current operating system.|
200+
|string NormalizeDirectory(params string[] path)|Gets the canonicalized full path of the provided directory and ensures it contains the correct directory separator characters for the current operating system while ensuring it has a trailing slash.|
201+
|string EnsureTrailingSlash(string path)|If the given path doesn't have a trailing slash then add one. If the path is an empty string, does not modify it.|
202+
|string GetPathOfFileAbove(string file, string startingDirectory)|Searches for a file based on the current build file's location, or based on `startingDirectory`, if specified.|
203+
|GetDirectoryNameOfFileAbove(string startingDirectory, string fileName)|Locate a file in either the directory specified or a location in the directory structure above that directory.|
204+
|string MakeRelative(string basePath, string path)|Makes `path` relative to `basePath`. `basePath` must be an absolute directory. If `path` cannot be made relative, it is returned verbatim. Similar to `Uri.MakeRelativeUri`.|
205+
|string ValueOrDefault(string conditionValue, string defaultValue)|Return the string in parameter 'defaultValue' only if parameter 'conditionValue' is empty, else, return the value conditionValue.|
193206

194207
## Nested Property Functions
195208
You can combine property functions to form more complex functions, as the following example shows.

0 commit comments

Comments
 (0)