为什么System.Environment.Version报告框架2? [英] Why does System.Environment.Version report framework 2?

查看:115
本文介绍了为什么System.Environment.Version报告框架2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个网站针对框架3.5,一台机器上高达3.5 SP 1安装,当我打电话System.Environment.Version在一个页面,它会报告2.0.50727.3053。任何人都可以说明为什么出现这种情况?

In a web site targeted for Framework 3.5, on a machine with up to 3.5 SP 1 installed, when I call System.Environment.Version in a page, it reports 2.0.50727.3053. Can anyone suggest why this happens?

推荐答案

MSDN文档为Environment.Version 这样说:

获取描述公共语言运行库的主要,次要,构建和版本号版本的对象。

Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.

在3.5 SP1的CLR版本仍然为2.0。

The CLR version in 3.5 SP1 is still 2.0.

因此​​,没有错误,它的行为完全一样记录。

Hence, no error, it behaves exactly as documented.

这篇关于为什么System.Environment.Version报告框架2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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