始终从 GAC 获取最新的 dll

发布于 2024-10-20 02:58:57 字数 225 浏览 3 评论 0原文

我们有一个版本为 1.0.1.* 的 dll,许多本身在不同计算机上运行的应用程序都使用它。该 dll 驻留在运行应用程序的计算机的 GAC 中。应用程序包含此 dll 作为引用,并将“特定版本”设置为 false。我们已经推出了该 dll 的 1.0.2.* 版本,它向后兼容。

有没有办法部署新的 dll 并要求所有应用程序选择最新版本,而无需重新编译应用程序。我知道使用发布者策略进行程序集重定向。还有别的办法吗?

We have a dll with version 1.0.1.* that is used by many applications whcih themselves run on different machines. This dll resides in the GAC of the machine running the application. The application includes this dll as a reference with "Specific Version" set to false. We have come up with version 1.0.2.* of this dll which is backward compatible.

Is there a way to deploy the new dll and ask all the applications to pick the latest version without having to recompile the applications. I am aware of assembly redirection using Publisher Policy. Is there another way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉城已无爱 2024-10-27 02:58:57

发布商政策是明确设计用于执行此操作的,不考虑它来解决您的问题没有多大意义。鉴于您的更新是“向后兼容”的,一种简单的方法是不更改 [AssemblyVersion],而仅增加 [AssemblyFileVersion]。

A publisher policy is explicitly designed to do this, not considering it to solve your problem doesn't make a lot of sense. Given that your update is 'backward compatible', a no-hassle approach would be to simply not change the [AssemblyVersion] but only increment the [AssemblyFileVersion].

疑心病 2024-10-27 02:58:57

您可以在 web.config 中添加新的 AssemblyBinding 元素:

<dependentAssembly>
  <assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral" />
  <bindingRedirect oldVersion="1.0.0.0-2.1.1.4000" newVersion="2.1.2.4000" />
</dependentAssembly>

You can add a new AssemblyBinding element in your web.config:

<dependentAssembly>
  <assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral" />
  <bindingRedirect oldVersion="1.0.0.0-2.1.1.4000" newVersion="2.1.2.4000" />
</dependentAssembly>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文