.NET 4.0 Framework Upgrade Requirements?

寵の児 提交于 2020-01-03 12:33:10

问题


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?

回答1:


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.




回答2:


As far as I know

  1. Yes, They will. If you are developing with VS2010 then they will need to.
  2. No idea :)

The system requirements can be found on Download page.




回答3:


It appears that for webapps they will need to be upgraded. http://msdn.microsoft.com/en-us/library/dd483478%28VS.100%29.aspx

There are so many changes in .NET Framework 4 that I don't see how you can write code in 3.5 and not be running into the new features. If you are developing an application with VS2010, then doing this update just makes sense to me.

http://msdn.microsoft.com/en-us/library/dd409230%28VS.100%29.aspx



来源:https://stackoverflow.com/questions/1384875/net-4-0-framework-upgrade-requirements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!