在具有.NET v4.6.x的Windows Server 2012上为.NET v4.5.1编译的代码

编程入门 行业动态 更新时间:2024-10-27 18:24:08
本文介绍了在具有.NET v4.6.x的Windows Server 2012上为.NET v4.5.1编译的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有.NET应用程序,主要是WCF Web服务和一些使用.NET v4.5.1 Framework编译的Windows服务.在修补过程中,基础结构团队已将服务器(Windows Server 2012)上的框架升级到.NET Framework. v4.6.x. 到目前为止,我们还没有看到应用程序有任何负面影响或问题.假设代码是为v4.5.1编译的,那么如何在运行时解决此问题?是否每次都会发生自动重定向,这可能会导致一些开销? 是否建议重新编译/构建针对v4.6.x的代码并重新部署应用程序,还是可以将其保持原样?

Hi, We have .NET applications, mainly WCF Web Services and some Windows Services that were compiled using .NET v4.5.1 Framework. In the course of patching, the Infrastructure team has upgraded the framework on the Servers (Windows Server 2012) to .NET Framework v4.6.x. As of now we are not seeing any negative impact or issues with the applications. Given that the code was compiled for v4.5.1, how does this get resolved at runtime? Is there a automatic redirection that happens everytime which could result in some overhead? Is it recommended to re-compile/build the code targeting v4.6.x and re-deploying the applications or would it be OK to leave it as-is ?

谢谢.

推荐答案

您好,Vikram,

Hi Vikram,

感谢您在MSDN论坛中发帖.

Thank you for posting in MSDN forum.

>>是否建议重新编译/构建针对v4.6.x的代码并重新部署应用程序,还是可以将其保持原样?

保持原样就好.

.Net Framework 4.6.x是Microsoft .NET Framework 4.5的高度兼容的就地更新,因为服务器上的框架已升级,还包含V4.5的类和程序集.

.Net Framework 4.6.x is a highly compatible, in-place update to the Microsoft .NET Framework 4.5, since the framework on the Servers is upgraded, also contains the class and assembly of V4.5.

.NET Framework 4.5及其发行版(4.5.1、4.5.2、4.6、4.6.1和4.6.2)与使用.NET Framework早期版本构建的应用程序向后兼容.

The .NET Framework 4.5 and its point releases (4.5.1, 4.5.2, 4.6, 4.6.1, and 4.6.2) are backward-compatible with apps that were built with earlier versions of the .NET Framework.

参考: msdn.microsoft/en-us/library/ff602939 (v = vs.110).aspx

如果您发现v4.5中存在与v4.6.x不兼容的任何类,则可以重新调试并重新编译,以便可以在服务器端成功部署.

If you find there is anyclass in the v4.5 not compatibility withv4.6.x , you could re-debug and re-compile then so that could deploy successfully on the Server side.

最好的问候

更多推荐

在具有.NET v4.6.x的Windows Server 2012上为.NET v4.5.1编译的代码

本文发布于:2023-11-16 16:53:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1606121.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上为   代码   NET   Windows   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!