GetWinFXPath 任务

更新:2007 年 11 月

GetWinFXPath 任务返回当前 Microsoft .NET Framework 运行库的目录。

任务参数

参数

说明

WinFXPath

可选的 String 输出参数。

指定 .NET Framework 运行库的实际路径。

WinFXNativePath

必需的 String 参数。

指定本机 运行库的路径。

WinFXWowPath

必需的 String 参数。

指定 32 位 Windows 中的 Microsoft .NET Framework 程序集在 64 位系统上 Windows 模块上的路径。

备注

如果在 64 位处理器上执行 GetWinFXPath 任务,WinFXPath 参数将设置为存储在 WinFXWowPath 参数中的路径;否则,WinFXPath 参数将设置为存储在 WinFXNativePath 参数中的路径。

示例

下面的示例演示如何使用 GetWinFXPath 任务检测 运行库的本机路径。

<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>

请参见

概念

生成 WPF 应用程序 (WPF)

其他资源

Windows Presentation Foundation MSBuild 参考

Windows Presentation Foundation MSBuild 任务参考

MSBuild 参考

MSBuild 任务参考