Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- fileName 
 Type: System.String- The file to find the path to. 
- toolsVersion 
 Type: System.String- The ToolsVersion for which to find the file. 
- architecture 
 Type: Microsoft.Build.Utilities.DotNetFrameworkArchitecture- The architecture of the build tools file to get. 
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.