ToolLocationHelper.GetPathToDotNetFrameworkSdkFile Method

Definition

Gets the fully qualified path to a file in the .NET Framework SDK.

Overloads

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion)

Gets the fully qualified path to a file in the .NET Framework SDK.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, DotNetFrameworkArchitecture)

Gets a fully qualified path to a file in the .NET Framework SDK.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion)

Gets a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion, DotNetFrameworkArchitecture)

Gets a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion)

Gets the fully qualified path to a file in the .NET Framework SDK.

public:
 static System::String ^ GetPathToDotNetFrameworkSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version);
public static string GetPathToDotNetFrameworkSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version);
static member GetPathToDotNetFrameworkSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion -> string
Public Shared Function GetPathToDotNetFrameworkSdkFile (fileName As String, version As TargetDotNetFrameworkVersion) As String

Parameters

fileName
String

The file to locate in the .NET Framework SDK.

version
TargetDotNetFrameworkVersion

The version of the .NET Framework to target.

Returns

A string containing the fully qualified path to the \bin directory of the .NET Framework SDK, or a null reference (Nothing in Visual Basic) if the targeted version of the .NET Framework SDK is not installed.

Remarks

The path for the SDK takes in consideration the processor architecture environment information for the calling process, so it might end up being ".../bin/i64", for example.

Unlike GetPathToDotNetFrameworkFile and GetPathToSystemFile this method checks for the existence of the file, so that an invalid fileName returns null.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, DotNetFrameworkArchitecture)

Gets a fully qualified path to a file in the .NET Framework SDK.

public:
 static System::String ^ GetPathToDotNetFrameworkSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version, Microsoft::Build::Utilities::DotNetFrameworkArchitecture architecture);
public static string GetPathToDotNetFrameworkSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.DotNetFrameworkArchitecture architecture);
static member GetPathToDotNetFrameworkSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.DotNetFrameworkArchitecture -> string
Public Shared Function GetPathToDotNetFrameworkSdkFile (fileName As String, version As TargetDotNetFrameworkVersion, architecture As DotNetFrameworkArchitecture) As String

Parameters

fileName
String

File name to locate in the .NET Framework SDK directory

version
TargetDotNetFrameworkVersion

Version of the targeted .NET Framework

architecture
DotNetFrameworkArchitecture

The required architecture of the requested file.

Returns

A fully qualified path to a file in the .NET Framework SDK. Throws an error if the .NET Framework SDK can't be found.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion)

Gets a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.

public:
 static System::String ^ GetPathToDotNetFrameworkSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version, Microsoft::Build::Utilities::VisualStudioVersion visualStudioVersion);
public static string GetPathToDotNetFrameworkSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion);
static member GetPathToDotNetFrameworkSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion -> string

Parameters

fileName
String

File name to locate in the .NET Framework SDK directory

version
TargetDotNetFrameworkVersion

Version of the targeted .NET Framework

visualStudioVersion
VisualStudioVersion

Version of Visual Studio associated with the requested SDK.

Returns

Path string.

GetPathToDotNetFrameworkSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion, DotNetFrameworkArchitecture)

Gets a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.

public:
 static System::String ^ GetPathToDotNetFrameworkSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version, Microsoft::Build::Utilities::VisualStudioVersion visualStudioVersion, Microsoft::Build::Utilities::DotNetFrameworkArchitecture architecture);
public static string GetPathToDotNetFrameworkSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion, Microsoft.Build.Utilities.DotNetFrameworkArchitecture architecture);
static member GetPathToDotNetFrameworkSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion * Microsoft.Build.Utilities.DotNetFrameworkArchitecture -> string

Parameters

fileName
String

File name to locate in the .NET Framework SDK directory

version
TargetDotNetFrameworkVersion

Version of the targeted .NET Framework

visualStudioVersion
VisualStudioVersion

Version of Visual Studio associated with the requested SDK.

architecture
DotNetFrameworkArchitecture

The required architecture of the requested file.

Returns

Path string.

Applies to