.NET 4.0 Framework升级要求?

标签 .net asp.net .net-4.0

即将发布的.NET 4版本有哪些要求?搜寻此内容,似乎找不到明确的答案。具体来说...

  • 客户是否必须将其.NET Framework CLR(从1.1升级到2.0)才能运行以4.0为目标的应用程序?
  • ASP.NET是需要升级框架还是行为类似于运行3.5个应用程序的2.0?
  • 最佳答案

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



    是的,只要您的目标是具有新CLR版本的.NET 4.0。但是,您可以针对4.0之前的框架来避免这种情况,并与以前的CLR版本一起运行。

    查看Scott Guthrie的博客文章:Multi-Targeting Support (VS 2010 and .NET 4 Series)

    在那篇博文中,Scott瞄准了.NET 2.0,并且在博文中途有一张截屏,显示ASP.NET在2.0上运行,他写道:

    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)



    该帖子以.NET 4.0为目标,并显示了类似的屏幕快照,显示了在4.0上运行的ASP.NET。

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



    斯科特(Scott)在上面的帖子对此进行了介绍。同样,这取决于您的目标。

    此外,Multi-Targeting section of the ASP.NET 4.0 whitepaper在Web.config编译元素<compilation targetFramework="4.0"/>中提到了使用新的ASP.NET 4.0 targetFramework属性的功能。如果您省略它,那么将推断目标框架。但是,以框架为目标还需要考虑其他因素,例如:

    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.)



    出于更多考虑,请访问上述链接。

    关于.NET 4.0 Framework升级要求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1384875/

    相关文章:

    jquery - 从 aspx.cs 调用 jQuery 函数

    c# - Winforms:WAITING光标与信息文本

    asp.net - 为什么路由装饰器会破坏 ASP.NET MVC 2 中的路由?

    asp.net - 关于生成可打印报告/发票的建议?

    c# - 包含 Unicode 字符检查失败

    c# - 当基类是泛型时在 XAML 中设置依赖属性

    c# - .NET 中是否有与 Mac OS X 文档模式表等效的内容?

    c# - IQbservable 示例

    c# - 如何在 C# 中以管理员模式启动进程

    c# - Windows 事件日志 - 如何注册事件源?