在运行时更改 Windows 工作流程序集?

发布于 2024-08-14 04:43:55 字数 481 浏览 1 评论 0原文

我们即将部署我正在开发的软件项目的 1.2 版本(从 1.1 版本升级)。就目前情况而言,有一些仍在进行中的出色工作流程,如果我们将工作流程和支持程序集更新到版本 1.2,这些工作流程将会中断,因为序列化工作流程将查找这些程序集的 1.1 版本。

一种可能的解决方案是将 1.1 版本的程序集放入 GAC 中。不幸的是,这是不可能的,因为 1.1 版本从未被赋予强名称。

如果我没记错的话,有一种方法可以包含一个文件,告诉 .Net 运行时在查找 1.1 版程序集时可以加载 1.2 版程序集,但我不记得它叫什么了。我认为这是某种 xml 文件。有人记得这叫什么并且知道任何文档链接吗?

对于此迭代,我的另一种解决方案是更改构建,以便工作流所需的程序集的版本号不会增加,并且它们使用 1.1 程序集中的特定版本号。这会起作用,因为它们没有任何改变,但这不是一个很好的长期解决方案。

从长远来看,我必须开始使用强名称签署所需的程序集,以便将它们放入 GAC 中。这里有任何潜在的问题吗?

We’re about to deploy version 1.2 of a software project I was working on, up from version 1.1. As it stands right now, there are a few outstanding workflows that are still in progress that will break if we update the workflow and supporting assemblies to version 1.2 because the serialized workflows will be looking for version 1.1 of those assemblies.

One possible solution is to put the 1.1 versions of the assemblies in the GAC. Unfortunately that isn’t possible because the 1.1 versions were never given a strong name.

If I remember correctly, there is a way to include a file that tells the .Net runtime that version 1.2 assemblies are ok to load when looking for version 1.1 assemblies but I can’t remember what that is called. I think it’s some sort of xml file. Does anyone remember what this is called and know any links to documentation?

An alternate solution, for this iteration, is for me to change the build so that the assemblies needed by the workflow do not have their version number incremented and they use the specific version number from the 1.1 assemblies. This will work because nothing has changed in them, but it’s not a great long term solution.

Long term I’ll have to start signing the required assemblies with a strong name so they can be put in the GAC. Any potential issues here?

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

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

发布评论

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

评论(1

初与友歌 2024-08-21 04:43:55

您无法对根本没有强名称的程序集进行版本控制,因此您无能为力。最好的选择是保留现有工作流程不变,然后复制它们以创建新工作流程,并更改这些副本以反映新工作流程,并开始将这些副本用于所有新工作。

我写了一系列关于版本控制工作流程的博客文章。第一部分位于此处与其他人的链接。

You can't version assemblies that don't have a strong name at all so there is little you can do. The best option would be to leave the existing workflows as they are and copy them to create new ones and changes those copies to reflect the new workflow and start using those for all new work.

I did a series of blog posts about versioning workflow. Part one is here with links to the others.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文