[英]i want to know which .net CLR version my application is using
i want to know which CLR version my application is using.我想知道我的应用程序正在使用哪个 CLR 版本。
I "dont" want to use either clrver.exe or GetCORVersion(),GetRequestedRuntimeInfo(),GetRequestedRuntimeversion() as these ways are Visual Studio specific.我“不想”使用clrver.exe 或 GetCORVersion(),GetRequestedRuntimeInfo(),GetRequestedRuntimeversion(),因为这些方式是Visual Studio特定的。 Is there any .net framework related exe/dll/api which will give me CLR versions since i want to use the java language to know about it and need a way which also work when framework is present but not the VS.
是否有任何 .net 框架相关的 exe/dll/api 将为我提供 CLR 版本,因为我想使用 java 语言来了解它,并且需要一种在框架存在但不存在 VS 时也可以工作的方法。 Registry key value will be a great option.
注册表键值将是一个不错的选择。 i want o/p like clrver -all
我想要像clrver -all这样的 o/p
Have you tried simply: Environment.Version
您是否简单地尝试过:
Environment.Version
Maybe the RuntimeEnvironment.GetRuntimeDirectory Method ?也许RuntimeEnvironment.GetRuntimeDirectory 方法?
EDIT: If you only have access to the registry (if your program is not a .NET one), I suggest you use this SO answer: How to detect what .NET Framework versions and service packs are installed?编辑:如果您只能访问注册表(如果您的程序不是 .NET 一个),我建议您使用这个 SO 答案: 如何检测安装了哪些 .NET 框架版本和服务包?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.