put up a cool command-line Cyclomatic Complexity analyzer and inside he runs around looking for the location of ILDASM.exe so he can do his calculations on the underlying IL (so it's largely a text processing exercise). I complained to him that his tool failed to find the SDK on my machine (probably because I have 3 different CLRs instaled).
放置了一个很酷的命令行Cyclomatic Complexity分析器,他在内部四处寻找ILDASM.exe的位置,以便他可以对基础IL进行计算(因此,这主要是文本处理练习)。 我向他抱怨说他的工具无法在我的机器上找到SDK(可能是因为我安装了3个不同的CLR)。
How do you find out where the .NET Framework SDK is installed? Aaron Stebner to the rescue. The values beneath HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\FRAMEWORKSDK tell you where the SDK is installed. If there's a 7.1 value, you know where the .NET 1.1 Framework SDK is installed. If there's an 8.0 value, you know where the .NET 2.0 Framework SDK is installed. The value on the other side of the version number is the location.
如何查找.NET Framework SDK的安装位置? 亚伦·斯特布纳( Aaron Stebner)进行营救。 HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ VisualStudio \ SxS \ FRAMEWORKSDK下的值会告诉您SDK的安装位置。 如果值为7.1,则说明.NET 1.1 Framework SDK的安装位置。 如果值为8.0,则说明.NET 2.0 Framework SDK的安装位置。 版本号另一侧的值是位置。
翻译自: https://www.hanselman.com/blog/how-to-detect-where-and-if-the-net-framework-sdk-is-installed