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