共用方式為


ToolLocationHelper.GetPathToWindowsSdkFile Method

Definition

Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.

Overloads

GetPathToWindowsSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion)
Obsolete.

Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.

GetPathToWindowsSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion, DotNetFrameworkArchitecture)
Obsolete.

Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version and the desired architecture. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.

GetPathToWindowsSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion)

Source:
ToolLocationHelper.cs

Caution

Consider using GetPlatformSDKLocationFile instead

Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.

public:
 static System::String ^ GetPathToWindowsSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version, Microsoft::Build::Utilities::VisualStudioVersion visualStudioVersion);
[System.Obsolete("Consider using GetPlatformSDKLocationFile instead")]
public static string GetPathToWindowsSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion);
public static string GetPathToWindowsSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion);
[<System.Obsolete("Consider using GetPlatformSDKLocationFile instead")>]
static member GetPathToWindowsSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion -> string
static member GetPathToWindowsSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion -> string
Public Shared Function GetPathToWindowsSdkFile (fileName As String, version As TargetDotNetFrameworkVersion, visualStudioVersion As VisualStudioVersion) As String

Parameters

fileName
String

The name of the file being requested.

version
TargetDotNetFrameworkVersion

Target .NET Framework version.

visualStudioVersion
VisualStudioVersion

Version of Visual Studio associated with the SDK.

Returns

Path to the appropriate Windows SDK file

Attributes

Applies to

GetPathToWindowsSdkFile(String, TargetDotNetFrameworkVersion, VisualStudioVersion, DotNetFrameworkArchitecture)

Source:
ToolLocationHelper.cs

Caution

Consider using GetPlatformSDKLocationFile instead

Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version and the desired architecture. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.

public:
 static System::String ^ GetPathToWindowsSdkFile(System::String ^ fileName, Microsoft::Build::Utilities::TargetDotNetFrameworkVersion version, Microsoft::Build::Utilities::VisualStudioVersion visualStudioVersion, Microsoft::Build::Utilities::DotNetFrameworkArchitecture architecture);
[System.Obsolete("Consider using GetPlatformSDKLocationFile instead")]
public static string GetPathToWindowsSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion, Microsoft.Build.Utilities.DotNetFrameworkArchitecture architecture);
public static string GetPathToWindowsSdkFile (string fileName, Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.VisualStudioVersion visualStudioVersion, Microsoft.Build.Utilities.DotNetFrameworkArchitecture architecture);
[<System.Obsolete("Consider using GetPlatformSDKLocationFile instead")>]
static member GetPathToWindowsSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion * Microsoft.Build.Utilities.DotNetFrameworkArchitecture -> string
static member GetPathToWindowsSdkFile : string * Microsoft.Build.Utilities.TargetDotNetFrameworkVersion * Microsoft.Build.Utilities.VisualStudioVersion * Microsoft.Build.Utilities.DotNetFrameworkArchitecture -> string
Public Shared Function GetPathToWindowsSdkFile (fileName As String, version As TargetDotNetFrameworkVersion, visualStudioVersion As VisualStudioVersion, architecture As DotNetFrameworkArchitecture) As String

Parameters

fileName
String

The name of the file being requested.

version
TargetDotNetFrameworkVersion

Target .NET Framework version.

visualStudioVersion
VisualStudioVersion

Version of Visual Studio associated with the SDK.

architecture
DotNetFrameworkArchitecture

Desired architecture of the resultant file.

Returns

Path to the appropriate Windows SDK file

Attributes

Applies to