Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tfs MSBuild程序文件环境变量跨平台?_Tfs_Msbuild_Path_Program Files - Fatal编程技术网

Tfs MSBuild程序文件环境变量跨平台?

Tfs MSBuild程序文件环境变量跨平台?,tfs,msbuild,path,program-files,Tfs,Msbuild,Path,Program Files,我有一个MSBUILD目标代码段,该代码段具有以下类似的内容,用于执行外部应用程序: <Exec Command="&quot;C:\Program Files\dir\do.exe....&quot;" /> 它在x86机器上运行良好,但在x64系统上运行时当然会出现故障,因为路径应该是“程序文件(x86)”。以跨平台方式处理构建文件路径的正确方法是什么 谢谢 阅读以下内容: 显示设置变量然后执行重写将起作用。我正在试验这一点,它似乎是有效的: <P

我有一个MSBUILD目标代码段,该代码段具有以下类似的内容,用于执行外部应用程序:

<Exec Command="&quot;C:\Program Files\dir\do.exe....&quot;" />

它在x86机器上运行良好,但在x64系统上运行时当然会出现故障,因为路径应该是“程序文件(x86)”。以跨平台方式处理构建文件路径的正确方法是什么

谢谢

阅读以下内容:

显示设置变量然后执行重写将起作用。我正在试验这一点,它似乎是有效的:

 <PropertyGroup>
     <properPath>c:\program files\etc...</properPath>
     <properPath Condition="'$(PROCESSOR_ARCHITECTURE)'=='AMD64' or '$(PROCESSOR_ARCHITEW6432)'=='AMD64'">c:\program files (x86)\etc...</properPath>
 </PropertyGroup>

c:\program files\etc。。。
c:\ProgramFiles(x86)\etc。。。

您是否尝试使用环境变量来实现此目的?