我们有.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编译的代码
发布评论