为什么我不能显示ASP.NET Framework版本为3.5? [英] Why can't I display the ASP.NET Framework version as 3.5?

查看:172
本文介绍了为什么我不能显示ASP.NET Framework版本为3.5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人可以证实,我认为当我的应用程序是用.NET 3.5,这code

Can someone please confirm to me that when my application is written in .NET 3.5 that this code

System.Environment.Version.Major.ToString()

会产生这种

2.0.50727.1433

我只是移动到3.5和第一个应用程序,我是移动的内部网站。我认为一个非常简单的指标,它的工作是添加了Framework版本下我的应用程序版本,但上面的文字是正在生产。

I'm just moving to 3.5 and the first application I'm moving is an internal website. I thought a really easy indicator that it's working would be to add the Framework version next to my Application version but the above text is what is being produced.

我的有限的研究表明,.NET 3.5是2.0的味道等底层框架的版本仍将是2.0。 IIS应用程序池设置的建议是这种情况。

My limited research suggests that .NET 3.5 is a 'flavour' of 2.0 and so the underlying framework version will continue to be 2.0. The IIS application pool settings suggest this is the case.

这是正确的或者我可以让我的应用程序,以显示3.5?

Is this correct or can I get my application to show 3.5?

干杯

推荐答案

由于.NET 3.5使用CLR运行时版本2,3.5只是一套建立在2.0运行时的顶部组件。内部API,不能看出其中的差别。下面是一些code,它会告诉你是否3.5 present:

Because .NET 3.5 uses CLR runtime version 2. 3.5 is just a set of assemblies built on top of the 2.0 runtime. The internal APIs cannot tell the difference. Here is some code that will tell you whether 3.5 is present:

<一个href="http://blogs.msdn.com/astebner/archive/2007/11/29/6608419.aspx">http://blogs.msdn.com/astebner/archive/2007/11/29/6608419.aspx

请注意这不会告诉你是否你的code实际上是针对3.5的,但是你应该反正照顾,在你的清单。

Note this will not tell you whether your code is actually running against 3.5, but you should be taking care of that in your manifest anyway.

这篇关于为什么我不能显示ASP.NET Framework版本为3.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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