다음을 통해 공유


GetFrameworkSdkPath Task

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Retrieves the path to the Windows Software Development Kit (SDK).

Task Parameters

The following table describes the parameters of the GetFrameworkSdkPath task.

Parameter Description
FrameworkSdkVersion20Path Optional String read-only output parameter.

Returns the path to the .NET SDK version 2.0, if present. Otherwise returns String.Empty.
FrameworkSdkVersion35Path Optional String read-only output parameter.

Returns the path to the .NET SDK version 3.5, if present. Otherwise returns String.Empty.
FrameworkSdkVersion40Path Optional String read-only output parameter.

Returns the path to the .NET SDK version 4.0, if present. Otherwise returns String.Empty.
Path Optional String output parameter.

Contains the path to the latest .NET SDK, if any version is present. Otherwise returns String.Empty.

Remarks

In addition to the parameters listed above, this task inherits parameters from the TaskExtension class, which itself inherits from the Task class. For a list of these additional parameters and their descriptions, see TaskExtension Base Class.

Example

The following example uses the GetFrameworkSdkPath task to store the path to the Windows SDK in the SdkPath property.

<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">  
    <Target Name="GetPath">  
        <GetFrameworkSdkPath>  
            <Output  
                TaskParameter="Path"  
                PropertyName="SdkPath" />  
        </GetFrameworkSdkPath>  
        <Message Text="$(SdkPath)"/>  
    </Target>  
</Project>  

See Also

Tasks
Task Reference