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
fileName
Type: System.StringThe file to find the path to.
toolsVersion
Type: System.StringThe 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.