更新一个DLL在GACDLL、GAC

由网友(学会放手)分享简介:我有一个API DLL,一些第三方应用程序的参考。 I have an API DLL that several third party applications reference. 这些应用中想要的东西在更新方面的两种方式。1)我想最新的东西2)不更新我的直接二进制文件,往往Some of these a...

我有一个API DLL,一些第三方应用程序的参考。

I have an API DLL that several third party applications reference.

这些应用中想要的东西在更新方面的两种方式。 1)我想最新的东西 2)不更新我的直接二进制文件,往往

Some of these applications want things two ways in terms of updates. 1) I want the latest stuff 2) Don't update my direct binaries that often

已经有移动DLL到GAC并写入另一个DLL,它仅仅是包装在GAC中的DLL(该第三方应用程序将然后引用)的思想。这允许业务逻辑(这将经常改变的部分),以在GAC进行更新和包装DLL将只需要更新时新的功能被提供。

There has been the thought of moving the DLL into the GAC and writing another DLL that is simply the wrapper for the DLL in the GAC (which the 3rd party apps would then reference). This allows the business logic (the part that would change frequently) to be updated in the GAC and the wrapper DLL would only need to be updated when new functions were made available.

GAC是意守版本的DLL。因此包装DLL将有一个参考的API DLL的一个特定版本。有多难更新GAC DLL,以便对它的引用不破,但二进制内容不同?

The GAC is intended to keep versioned DLLs. So the wrapper DLL would have a reference to a specific version of the API DLL. How difficult is it to update the GAC DLL so that the references to it don't break but the binary contents differs?

这是简单,只要在更新时不改变GAC DLL版本?

Is this as simple as not changing GAC DLL versions when updating?

感谢。

推荐答案

您可以创建一个更新的组件,签署并推到GAC,这样的应用程序,它引用该程序集,就不会注意到其中的差别。你需要指定的版本号所有部分(即有版本号为1.2.3.4,而不是1.2.3。*在AasemblyInfo.cs文件),并使用相同的序列号键。然后将特定于版本的参考不会破碎。而你就可以,因为你需要更新你的DLL。

You can create an updated assembly, sign it and push it to the GAC so that the applications, which reference this assembly, won't notice the difference. You need to specify all parts of the version number (i.e. have the version number as 1.2.3.4 and not 1.2.3.* in AasemblyInfo.cs file) and use the same sn key. Then the version-specific reference won't be broken. And you'll be able to update your DLL as you need.

阅读全文

相关推荐

最新文章