ToolLocationHelper.GetPathToWindowsSdkFile Method (String, TargetDotNetFrameworkVersion, VisualStudioVersion, DotNetFrameworkArchitecture)
Note: This API is now 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.
MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Namespace: Microsoft.Build.Utilities
Assembly: Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)
Syntax
'Declaration
<ObsoleteAttribute("Consider using GetPlatformSDKLocationFile instead")> _
Public Shared Function GetPathToWindowsSdkFile ( _
fileName As String, _
version As TargetDotNetFrameworkVersion, _
visualStudioVersion As VisualStudioVersion, _
architecture As DotNetFrameworkArchitecture _
) As String
[ObsoleteAttribute("Consider using GetPlatformSDKLocationFile instead")]
public static string GetPathToWindowsSdkFile(
string fileName,
TargetDotNetFrameworkVersion version,
VisualStudioVersion visualStudioVersion,
DotNetFrameworkArchitecture architecture
)
[ObsoleteAttribute(L"Consider using GetPlatformSDKLocationFile instead")]
public:
static String^ GetPathToWindowsSdkFile(
String^ fileName,
TargetDotNetFrameworkVersion version,
VisualStudioVersion visualStudioVersion,
DotNetFrameworkArchitecture architecture
)
[<ObsoleteAttribute("Consider using GetPlatformSDKLocationFile instead")>]
static member GetPathToWindowsSdkFile :
fileName:string *
version:TargetDotNetFrameworkVersion *
visualStudioVersion:VisualStudioVersion *
architecture:DotNetFrameworkArchitecture -> string
public static function GetPathToWindowsSdkFile(
fileName : String,
version : TargetDotNetFrameworkVersion,
visualStudioVersion : VisualStudioVersion,
architecture : DotNetFrameworkArchitecture
) : String
Parameters
fileName
Type: System.StringThe name of the file being requested.
version
Type: Microsoft.Build.Utilities.TargetDotNetFrameworkVersionTarget .NET Framework version.
visualStudioVersion
Type: Microsoft.Build.Utilities.VisualStudioVersionVersion of Visual Studio associated with the requested SDK.
architecture
Type: Microsoft.Build.Utilities.DotNetFrameworkArchitectureDesired architecture of the resultant file.
Return Value
Type: System.String
Path to the appropriate Windows SDK file
.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.