NAnt SDK Documentation - v0.92 |

# EnvironmentFunctions.GetVersion Method

Gets a Version object that describes the major, minor, build, and revision numbers of the Common Language Runtime.

[Visual Basic]
<Function(Name:="get-version")>
Public Shared Function GetVersion() As Version
[C#]
[Function(Name="get-version")]
public static Version GetVersion();

#### Return Value

A Version object.

#### Example

Output the major version of the CLR.

    <echo message="Major version=${version::get-major(environment::get-version())}" />

#### See Also

EnvironmentFunctions Class | NAnt.Core.Functions Namespace