Partager via


GetFrameworkPath Task 

Retrieves the path to the .NET Framework assemblies.

Task Parameters

The following table describes the parameters of the GetFrameworkPath task.

Parameter Description

Path

Optional String output parameter.

Contains the path to the .NET Framework assemblies.

Remarks

If several versions of the .NET Framework are installed, this task returns the version that MSBuild is designed to run on.

Example

The following example uses the GetFrameworkPath task to store the path to the .NET Framework in the FrameworkPath property.

<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="GetPath">
        <GetFrameworkPath
            <Output
                TaskParameter="Path"
                PropertyName="FrameworkPath" />
        </GetFrameworkPath>
    </Target>
</Project>

See Also

Concepts

MSBuild Tasks

Other Resources

MSBuild Task Reference