Partager via


GetWinFXPath, tâche

La tâche GetWinFXPath retourne le répertoire de l'exécution Microsoft .NET Framework en cours.

Paramètres de la tâche

Paramètre

Description

WinFXPath

Paramètre de sortie String facultatif.

Spécifie le chemin d'accès réel au runtime .NET Framework.

WinFXNativePath

Paramètre String obligatoire.

Spécifie le chemin d'accès au runtime .NET Framework natif.

WinFXWowPath

Paramètre String obligatoire.

Spécifie le chemin d'accès vers les assemblys Microsoft .NET Framework dans le module 32 bits Windows on Windows sur des systèmes 64 bits.

Notes

Si la tâche GetWinFXPath s'exécute sur un processeur 64 bits, le paramètre WinFXPath a pour valeur le chemin d'accès stocké dans le paramètre WinFXWowPath ; sinon, le paramètre WinFXPath a pour valeur le chemin d'accès stocké dans le paramètre WinFXNativePath.

Exemple

L'exemple suivant indique comment utiliser la tâche GetWinFXPath pour détecter le chemin d'accès natif au runtime .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>

Voir aussi

Concepts

Génération d'une application WPF (WPF)

Autres ressources

Référence MSBuild - WPF

Référence des tâches MSBuild WPF

Référence MSBuild

Référence des tâches MSBuild