title | description | ms.date | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | author | ms.author | manager | ms.subservice | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GetFrameworkPath Task |
Learn how to use the MSBuild GetFrameworkPath task to retrieve the path to the .NET Framework assemblies. |
11/04/2016 |
reference |
|
|
ghogen |
ghogen |
mijacobs |
msbuild |
Retrieves the path to the .NET Framework assemblies. Retrieves the path to the .NET Framework assemblies.
The following table describes the parameters of the GetFrameworkPath
task.
Parameter | Description |
---|---|
FrameworkVersion11Path |
Optional String output parameter.Contains the path to the framework version 1.1 assemblies, if present. Otherwise returns null . |
FrameworkVersion20Path |
Optional String output parameter.Contains the path to the framework version 2.0 assemblies, if present. Otherwise returns null . |
FrameworkVersion30Path |
Optional String output parameter.Contains the path to the framework version 3.0 assemblies, if present. Otherwise returns null . |
FrameworkVersion35Path |
Optional String output parameter.Contains the path to the framework version 3.5 assemblies, if present. Otherwise returns null . |
FrameworkVersion40Path |
Optional String output parameter.Contains the path to the framework version 4.0 assemblies, if present. Otherwise returns null . |
Path |
Optional String output parameter.Contains the path to the latest framework assemblies, if any are available. Otherwise returns null . |
If several versions of the .NET Framework are installed, this task returns the version that MSBuild is designed to run on.
In addition to the parameters listed above, this task inherits parameters from the xref:Microsoft.Build.Tasks.TaskExtension class, which itself inherits from the xref:Microsoft.Build.Utilities.Task class. For a list of these additional parameters and their descriptions, see TaskExtension base class.
The following example uses the GetFrameworkPath
task to store the path to the .NET Framework in the FrameworkPath
property.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GetPath">
<GetFrameworkPath>
<Output
TaskParameter="Path"
PropertyName="FrameworkPath" />
</GetFrameworkPath>
</Target>
</Project>