.NET 4.0框架的升级要求? [英] .NET 4.0 Framework Upgrade Requirements?

查看:168
本文介绍了.NET 4.0框架的升级要求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是为即将到来的.NET 4发布的要求是什么?搜索围绕这个,可能似乎没有找到一个明确的答案。具体...

  1. 将客户不得不升级他们的.NET Framework CLR(比如从1.1到2.0)运行4.0的目标应用?
  2. 威尔ASP.NET需要一个框架,升级或意志的行为类似于2.0上运行的应用程序3.5?
解决方案
  

将客户不得不升级他们的.NET Framework CLR(比如从1.1到   2.0)运行4.0的目标应用?

是的,只要你面向.NET 4.0具有新的CLR版本。但是,你可以针对pre-4.0的框架,以避免这种情况,并与previous CLR版本上运行。

看看斯科特Guthrie的博客文章:<一个href="http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx"相对=nofollow>多定向支持(VS 2010和.NET 4系列)。

在那个岗位斯科特针对.NET 2.0和中途通过邮局有一个截图显示ASP.NET 2.0上运行,他写道:

  

当我们运行使用的应用程序   内置VS web服务器,它将运行   使用ASP.NET 2.0版本(和   VS 2010调试器将调试CLR   2.0工艺)

在使用后面向.NET 4.0和4.0上运行一个类似截图显示ASP.NET结束。

  

威尔ASP.NET需要一个框架,升级或意志的行为类似于   2.0上运行的应用程序3.5?

斯科特的帖子上面覆盖这一点。再次,它取决于你的目标。

此外,多目标的ASP.NET 4.0节白皮书提到使用新的ASP.NET 4.0 targetFramework属性在Web.config编译元素的能力:&LT;编译targetFramework =4.0/&GT; 。如果你忽略它,然后目标框架推断。但是,也有其他的考虑,以靶向的框架,例如:

  

在一个.NET Framework 4的应用程序   池,ASP.NET构建系统假设   在.NET Framework 4,如果目标   在Web.config文件不包括   在targetFramework属性,或者   在Web.config文件丢失。 (您   可能需要进行编码更改   您的应用程序,使其下运行   在.NET Framework 4。)

有关更多的考虑访问上述链接。

What are the requirements for the upcoming .NET 4 release? Searched around for this and couldn't seem to find a definitive answer. Specifically...

  1. Will clients have to upgrade their .NET Framework CLR (like from 1.1 to 2.0) to run 4.0-targeted applications?
  2. Will ASP.NET require a framework upgrade or will behavior be similar to 2.0 running 3.5 apps?

解决方案

Will clients have to upgrade their .NET Framework CLR (like from 1.1 to 2.0) to run 4.0-targeted applications?

Yes, provided you target .NET 4.0 which has a new CLR version. However, you can target pre-4.0 frameworks to avoid this and run with the previous CLR version.

Check out Scott Guthrie's blog post: Multi-Targeting Support (VS 2010 and .NET 4 Series).

In that post Scott targets the .NET 2.0 and midway through the post there's a screenshot showing ASP.NET running on 2.0 and he writes:

When we run the application using the built-in VS web-server, it will run using the ASP.NET 2.0 version (and the VS 2010 debugger will debug the CLR 2.0 process)

The post ends with targeting .NET 4.0 and a similar screenshot showing ASP.NET running on 4.0.

Will ASP.NET require a framework upgrade or will behavior be similar to 2.0 running 3.5 apps?

Scott's post above covers this. Again, it depends on what you target.

In addition, the Multi-Targeting section of the ASP.NET 4.0 whitepaper mentions the ability to use the new ASP.NET 4.0 targetFramework attribute in the Web.config compilation element: <compilation targetFramework="4.0"/>. If you omit it then the target framework is inferred. However, there are other considerations to targeting a framework, for example:

In a .NET Framework 4 application pool, the ASP.NET build system assumes the .NET Framework 4 as a target if the Web.config file does not include the targetFramework attribute or if the Web.config file is missing. (You might have to make coding changes to your application to make it run under the .NET Framework 4.)

For more considerations visit the aforementioned link.

这篇关于.NET 4.0框架的升级要求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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