Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update msbuild's property functions #111

Merged
merged 2 commits into from
May 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/msbuild/property-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ In the .NET Framework versions 4 and 4.5, property functions can be used to eval

- System.Math

- System.Runtime.InteropServices.OSPlatform

- System.Runtime.InteropServices.RuntimeInformation

- System.UInt16

- System.UInt32
Expand Down Expand Up @@ -190,6 +194,15 @@ In the .NET Framework versions 4 and 4.5, property functions can be used to eval
|int BitwiseAnd(int first, int second)|Perform a bitwise `AND` on the first and second (first & second).|
|int BitwiseXor(int first, int second)|Perform a bitwise `XOR` on the first and second (first ^ second).|
|int BitwiseNot(int first)|Perform a bitwise `NOT` (~first).|
|bool IsOsPlatform(string platformString)|Specify whether the current OS platform is `platformString`. `platformString` must be a member of `OSPlatform`.|
|bool IsOSUnixLike|True if current OS is a Unix system.|
|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.|
|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.|
|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.|
|string GetPathOfFileAbove(string file, string startingDirectory)|Searches for a file based on the current build file's location, or based on `startingDirectory`, if specified.|
|GetDirectoryNameOfFileAbove(string startingDirectory, string fileName)|Locate a file in either the directory specified or a location in the directory structure above that directory.|
|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`.|
|string ValueOrDefault(string conditionValue, string defaultValue)|Return the string in parameter 'defaultValue' only if parameter 'conditionValue' is empty, else, return the value conditionValue.|

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