ToolLocationHelper.GetPathToBuildToolsFile Method (String, String)

Given the name of a file and a ToolsVersion, return the path to that file in the MSBuild tools path for that ToolsVersion. For the msbuildtaskhost.exe and tracker.exe tools, the only version supported is “12.0”.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Syntax

'Declaration
Public Shared Function GetPathToBuildToolsFile ( _
    fileName As String, _
    toolsVersion As String _
) As String
public static string GetPathToBuildToolsFile(
    string fileName,
    string toolsVersion
)
public:
static String^ GetPathToBuildToolsFile(
    String^ fileName, 
    String^ toolsVersion
)
static member GetPathToBuildToolsFile : 
        fileName:string * 
        toolsVersion:string -> string
public static function GetPathToBuildToolsFile(
    fileName : String, 
    toolsVersion : String
) : String

Parameters

  • toolsVersion
    Type: System.String

    The ToolsVersion for which to find the file.

Return Value

Type: System.String
The path to the file in the tools path folder of the appropriate ToolsVersion if it exists, otherwise null.

.NET Framework Security

See Also

Reference

ToolLocationHelper Class

GetPathToBuildToolsFile Overload

Microsoft.Build.Utilities Namespace