升级相关的DLL而无需重新编译整个应用程序 [英] Upgrading dependent DLL without recompiling the whole application

查看:351
本文介绍了升级相关的DLL而无需重新编译整个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须从它的使用Aspose.Words.NET版本11.10.0现在,我们最近升级了Aspose.Words DLL版本服务应用最新的13.7.0

We have windows service application which is using Aspose.Words.NET version 11.10.0 Now we have recently upgraded the Aspose.Words dll version latest 13.7.0

由于我们已经部署了我们的windows服务应用程序在多个客户端,我们尝试用最新的最新版本替换旧Aspose.Words DLL。但是,当我们重新启动现有的Windows应用程序,它不与被替换的最新的Aspose.Words DLL工作。

Since we have already deployed our windows service applications in multiple clients, we tried replacing the old Aspose.Words dll with latest its latest version. But when we restart the existing windows application it doesn't work with the replaced latest Aspose.Words dll.

我们已经通过重新编译整个Windows应用程序引用Aspose.Words DLL的最新版本解决它。我们是否需要重新编译每次我们升级Aspose.Words DLL时重新部署我们整个Windows服务应用程序?

We have resolved it by recompiling the whole windows application referencing the latest version of Aspose.Words dll. Are we required to recompile and redeploy our whole windows service application every time we upgrade the Aspose.Words dll?

推荐答案

检查<一href="http://stackoverflow.com/questions/1461565/upgrade-a-reference-dll-in-a-c-sharp-project-without-recompiling-the-project?rq=1">this回答SO 了。

您需要按照以下步骤更新桌面/ Web客户端的配置文件。

You need to update the config files of the desktop/web clients as follows.

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <publisherPolicy apply="no" />
        <assemblyIdentity name="Aspose.Words"  publicKeyToken="716fcc553a201e56" />
        <bindingRedirect oldVersion="11.0.0.0-13.6.0.0"
                         newVersion="13.7.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

请注意,可能会有重大更改的API​​,它可能会导致其他错误。例如,一个方法或财产存在11.0 13.7被删除。当客户端应用程序调用特定的方法/属性中会抛出异常。因此,您必须验证的开发环境中,新版本将不会破坏你的应用程序。如果成功,那么你可以替换旧DLL用新的版本。

Please also note that there might be breaking changes in API which might lead to other errors. For example a method or property which existed in 11.0 is deleted in 13.7. The exception will be thrown when the client application calls the specific method/property. So, you must verify in development environment that the new version will not break your application. If it works, then you can just replace the old DLL with new version.

该配置文件被加载在运行时,这样你就可以更新,你的应用程序的部署配置文件。

The config file is loaded at runtime, so you can update the config files where your applications are deployed.

我的工作的Aspose作为一个开发者传播者。

I work for Aspose as a Developer Evangelist.

这篇关于升级相关的DLL而无需重新编译整个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆