Satellite Assembly 版本必须与基础版本匹配吗?

发布于 2024-07-17 10:09:37 字数 337 浏览 6 评论 0原文

我刚刚遇到了一种情况,我需要使用我们的一个程序集的新版本来修补发行版。 我的所有程序集都是强名称,这是一个 Windows 窗体应用程序。 我编辑了 App.config 来进行适当的重新映射,一切都很顺利,直到我们使用本地化版本测试了我们的软件。 我们看到的问题是现有的卫星程序集未加载,并且我们没有看到本地化资源。 我能找到的唯一解决方案是使用基本程序集作为模板,通过程序集链接器重建附属程序集。

有几个问题:

如果我的基础程序集是强命名的,那么我的卫星程序集也必须是强命名的吗? 就我而言,我没有使用 GAC。

为什么我的卫星程序集不使用 App.config 中指定的重定向?

I just ran into a situation where I needed to patch a release with a new version of one of our assemblies. All my assemblies are strong names and this is a Windows Forms application. I edited my App.config to do the appropriate re-mappings and all went fine until we tested our software with our localized version. The problem we saw is that the existing satellite assembly didn't load and we didn't see the localized resources. The only solution I could find was to rebuild the satellite assemblies with the assembly linker using the base assembly as a template.

A couple of questions:

If my base assembly is strong named, must my satellite assembly also be strong named? In my case I'm not using the GAC.

Why doesn't my satellite assembly use the redirection specified in my App.config?

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

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

发布评论

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

评论(1

别闹i 2024-07-24 10:09:37

是的,卫星程序集也必须是强命名的,并且需要与真实程序集相同的版本和公钥。

请参阅此链接:http://www.codeguru。 com/csharp/.net/net_general/tipstricks/article.php/c11367/

我不确定为什么当您使用重定向时它没有加载。 您将程序集 A 版本 1 替换为版本 2。您将版本 1 重定向到版本 2。您的程序集 A 的附属程序集仍处于版本 1 中吗? 它是否正确? 这当然行不通。 如果更换组件,则必须更换其卫星。

Yes, satellite assemblies must also be strong named, and need the same version and public key as the real assembly.

See this link: http://www.codeguru.com/csharp/.net/net_general/tipstricks/article.php/c11367/

I'm not sure why it is not loaded when you use the redirection. You replace assembly A version 1 with version 2. You redirect version 1 to version 2. You have satellite assemblies for assembly A still in version 1? Is this correct? This of course does not work. If you replace an assembly, you have to replace its satellites.

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