Operations: Server: How to Get Server Build Number

To get the server build number use GetBuildNumberOperation from Maintenance.Server


public GetBuildNumberOperation()

Return Value

The result of executing GetBuildNumberOperation is a BuildNumber object:

public class BuildNumber
    public string ProductVersion { get; set; }

    public int BuildVersion { get; set; }

    public string CommitHash { get; set; }

    public string FullVersion { get; set; }
ProductVersion current product version e.g. "4.0"
BuildVersion current build version e.g. 40
CommitHash git commit SHA e.g. ""a377982""
FullVersion semantic versioning e.g. "4.0.0"


var getBuildNumberResult = documentStore.Maintenance.Server.Send(new GetBuildNumberOperation());
var buildNumber = await documentStore.Maintenance.Server.SendAsync(new GetBuildNumberOperation());