我如何获得Msbuild.Exe路径 [英] How Do I Get The Msbuild.Exe Path
本文介绍了我如何获得Msbuild.Exe路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我正在使用Visual studio构建示例WIX项目。
为此,我需要'msbuild.exe'路径。(例如:C:\ WindowsD.Microsoft.NET \ Framework \v4.0.30319)
如何使用C#枚举'msbuild.exe'路径。
是否有任何API可以获取最新版本的msbuild.exe路径。
提前致谢。
问候,
Dileep
Dear All,
I am building sample WIX Project using Visual studio.
For that, I need 'msbuild.exe' path.(Ex: C:\Windows\Microsoft.NET\Framework\v4.0.30319)
How can i enumerate the 'msbuild.exe' path using C#.
Is there any API to get the latest version msbuild.exe path.
Thanks in advance.
Regards,
Dileep
推荐答案
如果您要创建构建工具链,那么只需复制MSBUILD.EXE
到工具
文件夹,例如脚本中该目录的引用。
If you are creating a build tool chain then just copy theMSBUILD.EXE
to aTools
folder for example and reference from that directory in your scripts.
To获取当前运行时.Net框架路径使用以下行:
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
To get the current runtime .Net framework path use the below line:
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
这篇关于我如何获得Msbuild.Exe路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文