PathAliases.

GetEnvironmentPath(ICakeContext, PathSettings) Method

Summary

Gets the environment's path.
Assembly
Cake.Path.dll
Namespace
Cake.Path
Containing Type
PathAliases

Syntax

public static string GetEnvironmentPath(this ICakeContext context, PathSettings pathSettings)

Examples

Task("GetEnvironmentPath")
  .Does(() => 
  {
     var settings = new PathSettings {
        Target = PathTarget.User // Target is only available in net45
     }

     string path = GetEnvironmentPath(settings);
  });

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
pathSettings PathSettings Settings for the PATH.

Return Value

Type Description
string Returns a string containing the path