MSBuild - 每次清理构建后程序集略有不同
我正在尝试使用现有的本地实现的 click-once。目前,我们手动更新实际更改的程序集的清单。我试图根据现有程序集和新建程序集的二进制比较使其自动化。不幸的是,似乎每次我运行 clean + build(自动构建脚本)时,程序集都会出现细微的差异,基本上使我们的单击一次解决方案的使用变得无效。我猜测这些差异是由某种引导生成或类似的东西引起的。有什么办法可以防止组件中的差异吗?
不幸的是,由于我们的分支/CI 策略,我无法选择不清理,因为每个版本都来自新分支。
否则,有关如何比较两个程序集以查看是否有任何代码已更改而无需访问源代码的任何建议。
谢谢,
大卫
I'm trying to work with an existing home grown implementation of click-once. Currently we manually update the manifest for assemblies that we actually changed. I'm attempting to make it automatic based on a binary comparison of the existing assemblies and the newly built assemblies. Unfortunately, it seems that each time I run clean + build (automated build script) there are small differences to the assemblies, essentially invalidating the use of our click-once solution at all. I'm guessing that these differences are caused by some sort of guid generation or something along those lines. Is there anyway to prevent the differences in the assemblies?
And unfortunately, due to our branching/CI strategy I don't have the option of not cleaning because each release is from a new branch.
Otherwise, any suggestions on how I can compare two assemblies to see if any code has changed, without having access to the source code.
Thanks,
David
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,自动构建系统会检查二进制文件与源文件(或目标文件与源文件,具体取决于语言)的文件系统时间戳。如果源比二进制/对象更新,则会触发重建。这个策略可能更适合你,而不是实际比较二进制文件/
Typically, autobuild systems check the filesystem timestamps of the binary vs the source files (or object files vs source files, depending on the language). If the source is newer than the binary/object, a rebuild is triggered. This strategy may work better for you instead of actually diffing binaries/
我发现 BitDiffer 是 www.BitWidgets.com 上的一个工具,可以比较程序集中发生的更改。虽然这比二进制比较运行得慢,但它不需要让 MSBuild 创建相同的程序集。
谢谢,
大卫
I found BitDiffer a tool from www.BitWidgets.com that compares what has changed in an assembly. While this runs slower than a binary comparison, it removes the need to have MSBuild create an identical assembly.
Thanks,
David