GetWinFXPath タスク

GetWinFXPath タスクは、現在の Microsoft .NET Framework ランタイムのディレクトリを返します。

タスク パラメーター

パラメーター

説明

WinFXPath

省略可能な String 型の出力パラメーター。

.NET Framework ランタイムへの実際のパスを指定します。

WinFXNativePath

必須の String 型のパラメーター。

ネイティブ .NET Framework ランタイムへのパスを指定します。

WinFXWowPath

必須の String 型のパラメーター。

64 ビット システムの 32 ビット Windows on Windows モジュール内の Microsoft .NET Framework アセンブリへのパスを指定します。

解説

GetWinFXPath タスクが 64 ビット プロセッサで実行されている場合は、WinFXPath パラメーターは WinFXWowPath パラメーターに保存されているパスに設定されます。その以外の場合は、WinFXPath パラメーターは WinFXNativePath パラメーターに保存されているパスに設定されます。

使用例

GetWinFXPath タスクを使用して、.NET Framework ランタイムへのネイティブ パスを検出する例を次に示します。

<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) のビルド

その他の技術情報

WPF MSBuild のリファレンス

WPF MSBuild タスク リファレンス

MSBuild リファレンス

MSBuild タスク リファレンス