如何知道它是哪个版本的ASP.net? [英] How to know which version of ASP.net it is?

查看:94
本文介绍了如何知道它是哪个版本的ASP.net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过查看ASP.NET项目,我们如何知道它内置的ASP.NET版本.有人可以列出识别版本的其他方法吗?

How can we know which version of ASP.NET it is built in by looking into the ASP.NET project. Could somebody please list different ways to identify the version?

谢谢

推荐答案

您需要谨慎使用此处使用的方法,因为对ASP.NET下.NET框架的某些更新似乎将在以前的版本号下运行.例如;

You need to be careful with the approach you use here because some updates to the .NET framework under ASP.NET will seemingly run under previous version numbers. For example;

  • ASP.NET 2.0网站可能正在运行v2.0或v3.5框架,并且
  • ASP.NET 4.0网站可能正在运行v4.0或v4.5框架

有两种方法可以检查正在运行的确切版本,在您的网页上添加:

There are a couple of ways to check the exact version you are running, on your web page add:

<%= System.Environment.Version.ToString() %>

作为一个例子;

  • 如果已安装v4.0,则会看到 v4.0.30319.1008
  • 如果已安装v4.5,则会看到 v4.0.30319.34209

将获得当前正在运行的版本.您可以在以下位置检查注册表中所有已安装的版本:

That will get the currently running version. You can check the registry for all installed versions at:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ NET Framework Setup \ NDP \ v4 \ Full

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

在此位置中,查看版本节点.

Within this location look at the Version node.

  • 如果已安装v4.0,则会看到 v4.0.30319
  • 如果已安装v4.5,则会看到 v4.5.51209

这篇关于如何知道它是哪个版本的ASP.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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