获取当前点网版我的应用程序 [英] Get the current dot net version of my application

查看:151
本文介绍了获取当前点网版我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何运行点网版我的asp.net应用程序。

How do I get the running dot net version of my asp.net application.

我试图从这里的解决方案

I tried the solution from here

<一个href=\"http://stackoverflow.com/questions/951856/is-there-an-easy-way-to-check-net-framework-verison-using-c\">Is有一种简单的方法来检查.NET框架verison使用C#?

它给安装的最高版本,但我需要运行的版本。

It gives the highest version installed but I need the running version.

推荐答案

使用 Environment.Version 获取运行时版本。它将给正被用于执行当前应用.NET CLR的版本号

Use Environment.Version for getting the run time version. It will give the version number of .Net CLR which is being used for executing current application.

您需要小心这里,它​​只会返回运行时版本没有框架的版本。用于.NET 3.0和.NET 3.5的CLR是.NET 2.0一样的CLR。

You need to be careful here, it will only return run time version not framework version. The CLR for .NET 3.0 and .NET 3.5 is the same CLR from .NET 2.0.

这篇关于获取当前点网版我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆