路径的MSBuild路径、MSBuild

2023-09-02 21:31:58 作者:只做自己的公主

我如何编程获取路径的MSBuild从那里我的.exe文件运行的机器?

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?

推荐答案

各地注册表戳,它看起来像

Poking around the registry, it looks like

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.

 
精彩推荐
图片推荐