Compartir a través de


ToolLocationHelper.GetPathToBuildToolsFile Method (String, String, DotNetFrameworkArchitecture)

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, _
    architecture As DotNetFrameworkArchitecture _
) As String
public static string GetPathToBuildToolsFile(
    string fileName,
    string toolsVersion,
    DotNetFrameworkArchitecture architecture
)
public:
static String^ GetPathToBuildToolsFile(
    String^ fileName, 
    String^ toolsVersion, 
    DotNetFrameworkArchitecture architecture
)
static member GetPathToBuildToolsFile : 
        fileName:string * 
        toolsVersion:string * 
        architecture:DotNetFrameworkArchitecture -> string
public static function GetPathToBuildToolsFile(
    fileName : String, 
    toolsVersion : String, 
    architecture : DotNetFrameworkArchitecture
) : 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