GetWinFXPath 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

The GetWinFXPath task returns the directory of the current Microsoft .NET Framework runtime.

Task Parameters

Parameter Description
WinFXPath Optional String output parameter.

Specifies the real path to the .NET Framework runtime.
WinFXNativePath Required String parameter.

Specifies the path to the native .NET Framework runtime.
WinFXWowPath Required String parameter.

Specifies the path to the Microsoft .NET Framework assemblies in the 32-bit Windows on Windows module on 64-bit systems.

Remarks

If the GetWinFXPath task is executing on a 64-bit processor, the WinFXPath parameter is set to the path that is stored in the WinFXWowPath parameter; otherwise, the WinFXPath parameter is set to the path that is stored in the WinFXNativePath parameter.

Example

The following example shows how to use the GetWinFXPath task to detect the native path to the .NET Framework runtime.

<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">  
  <UsingTask   
    TaskName="Microsoft.Build.Tasks.Windows.GetWinFXPath"   
    AssemblyFile="C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationBuildTasks.dll" />  
  <Target Name="GetWinFXPathTask">  
    <GetWinFXPath  
      WinFXNativePath="c:\WinFXNative"   
      WinFXWowPath="c:\WinFXWowNative" />  
  </Target>  
  <Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />  
</Project>  

See Also

WPF MSBuild Reference
Task Reference
MSBuild Reference
Task Reference
Building a WPF Application (WPF)