使 .exe 和 .dll 具有相同版本的好做法?
对于新版本,我增加了可执行文件的版本号,即使 dll 根本没有更新,我是否应该使所有 dll 具有与可执行文件相同的版本号?
For a new release I increase the version number of the executable, should I make all the dll have the same version number as the executable even if the dll is not updated at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
保持 DLL 版本号相同可以更轻松地验证客户的安装是否一致。为了实现这一点,在 MSVC++ 中,您可以将版本号包含在包含在 .rc 文件中的头文件中,这样您只需在一个位置定义版本号。您可能不想在其中包含构建号(版本中的第四个数字),以便您可以单独修补 DLL。我将构建 # 放入每个 DLL 头文件中来执行此操作。
Keeping the DLL version #'s the same make it easier to verify that a customer has a consistent install. To achieve this, in MSVC++ You can include the version numbers in a header file that is included into the .rc file so that you only need define the version # in one place. You probably don't want to include the build # (the 4th number in the version) in this so that you can patch DLL's individually. I put the build # in a per-DLL header file to do this.
仅当您的产品捆绑为单个软件包(如 .msi 或 .cab 文件)时才建议使用。否则,它会使您的部分更新过于繁重,因为这将需要更新所有二进制文件,即使不需要更新。
Only recommended if your product is bundled as single package like .msi or .cab file. Otherwise it will make your partial updates too heavy as that will require all the binaries to be updated even if they are not required to.