比较产品的构建中发布 [英] comparing products of builds in release
问题描述
我需要比较,以确定我能重现完全相同的产品打造VS2005的输出。
I need to compare build outputs of VS2005 in order to be sure I can reproduce the exact same product.
当我做两个版本一个接一个地在发布后并比较产生的文件,我得到不同的文件,做文本比较,似乎不仅仅是日期时间是不同的。
when I do two builds one after the other in release and compare the produced files I get different files, doing text comparison it seems that more than just the datetime is different
我怎么能建立以再现每一个完全相同的产品?时间
how can I build in order to reproduce exact same product each time ?
推荐答案
当你构建,编译器嵌入:
Whenever you build, the compiler embeds:
- 的日期和时间
- 一个GUID(用于调试等等,我相信)
- 潜在的程序集的版本(这可能有1.2.3。*和自动填充)
- 潜在的强大的哈希值
- The date and time
- A GUID (used for debugging etc, I believe)
- Potentially the assembly version (which may have "1.2.3.*" and populated automatically)
- Potentially a strong hash
一对夫妇的选择:
- 找到出了文件的已知immaterially不同的抹这些字节,然后比较
- 使用ILDASM的组件转换为文本,然后比较这些结果。 (我没有检查这是否揭示了差异太大 - 它可以这样做,在这种情况下,你又不得不明确忽略某些部分)
这问题确实每隔一段时间弹出,所以我会看看我能拿出一个工具做比较 - 虽然它不可能应付签名的程序集的签名的位置可能会有所不同显著。
This problem does pop up every so often, so I'll see if I can come up with a tool to do the comparisons - although it's unlikely to cope with signed assemblies, as the location of the signature could vary significantly.
这篇关于比较产品的构建中发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!