本文介紹了MSBuild 的路徑的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
如何以編程方式從運行 .exe 的計算機獲取 MSBuild 的路徑?
How can I programatically get the path to MSBuild from a machine where my .exe is running?
我可以從環境中獲取 .NET 版本,但有沒有辦法為 .NET 版本獲取正確的文件夾?
I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET version?
推薦答案
翻看注冊表,看起來像
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions2.0
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions3.5
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSBuildToolsVersions4.0
可能是你所追求的;啟動 regedit.exe 并查看.
may be what you're after; fire up regedit.exe and have a look.
reg.exe query "HKLMSOFTWAREMicrosoftMSBuildToolsVersions4.0" /v MSBuildToolsPath
通過 PowerShell 查詢(根據 MovGP0)
dir HKLM:SOFTWAREMicrosoftMSBuildToolsVersions
這篇關于MSBuild 的路徑的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!