Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET 4.0 Framework Upgrade Requirements?

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?
like image 831
Brandon Avatar asked Sep 06 '09 04:09

Brandon


1 Answers

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.

like image 192
Ahmad Mageed Avatar answered Oct 08 '22 23:10

Ahmad Mageed