我怎样才能修补.NET程序集? [英] How can I patch .NET assemblies?

查看:148
本文介绍了我怎样才能修补.NET程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我编译C#项目两次,我会得到两个组件。这些组件是不完全相同(使用二进制差异)。我能想到的原因,为什么会是这样,但事实仍然是两个组件的来源是相同的。

If I compile a C# project twice, I will get two assemblies. These assemblies aren't exactly the same (using a binary diff). I can think of reasons why this is so, but the fact remains that the source for the two assemblies are identical.

我关心创建这些组件之间的补丁和客户机上应用修补程序。

I am concerned with creating a patch between these assemblies, and applying the patch on a customer machine.

有谁知道一个库(最好是.NET)或工具,使用它我可以创建和应用补丁的?

Does anyone know of a library (preferably .NET) or tool with which I can create and apply patches?

理想的情况下,还应该处理的微小变化,如改变对项目级别依赖关系或调整源的几行。它并不一定能够应付较大的变化,因为我很高兴来代替全部装配在这种情况下

Ideally it should also handle small changes, like changing dependencies on a project level or tweaking a few lines in the source. It does not have to be able to cope with larger changes, because I am happy to replace assemblies in full in this case.

更新

我想多一点的背景可能有助于澄清什么,我在得到。我有一个持续集成服务器构建我的应用程序。我更改文件和程序集的版本,以反映版本号和版本我建设。我可以做不同的,但是这是我喜欢的选项。

I think a bit more background might help clarify what I'm getting at. I've got a continuous integration server building my application. I change the file and assembly version to reflect the build number and version I'm building. I could have done it differently, but this is the option I like.

这将导致集的引用来改变,当我建立我的应用程序,但我很高兴。我现在关心的是分配的更新以前发布的版本。我建立使用InstallShield的更新。可用的InstallShield的组件减少到小补丁。这些并不被很多增加更新的大小。

This causes assembly references to change when I build my application, but I'm happy with that. I'm now concerned with distributing an update to a previously released version. I build updates using InstallShield. The assemblies available to InstallShield are reduced to small patches. These do not increase the size of the update by a lot.

我的应用程序有一些数据文件,这些文件基本上包含加密档案集。 InstallShield不会进入这些组件或理解我的档案。它不知道如何解密和解压。我写我自己的日常补丁发现其在先前的存档更改的文件,并用新的更新版本替换它们。基本上是一个搜索和替换策略。

My application has a few data files, which are basically encrypted archives containing assemblies. InstallShield does not have access to these assemblies or understand my archive. It does not know how to decrypt and extract it. I've written my own patch routine which finds changed files in the previous archive and replaces them with the new updated version. Basically a search and replace strategy.

在一个档案中包含近百项而且还在不断增长,这些组件和一些组件含有大量的数据文件作为资源。这些组件所依赖的是应用程序的一部分组件。他们持续集成构建过程中还编。在生成过程中没有编译它们会留有余地的依赖问题,我不愿意去尝试和管理。每次我创建一个补丁,所有这些组件都包括在内。我现在在看选项通过为这些组件补丁程序,以减少补丁大小。

The one archive contains almost a hundred (and growing) of these assemblies and some of these assemblies contain large data files as resources. These assemblies are dependent on assemblies which are part of the application. They are also compiled during the continuous integration build. Not compiling them during the build will leave room for dependency issues and I'm not willing to try and manage that. Every time I create a patch, all of these assemblies are included. I'm now looking at options to decrease the patch size by generating patches for these assemblies.

推荐答案

这是不是.NET,但应该能够生成补丁文件给你 -

This is not .net but should be able to generate a patch file for you -

http://www.tibed.net/vpatch/

我用它为游戏和地图等但应与任何两个文件工作。

I used to use it for gaming and maps e.t.c. but it should work with any two files.

这篇关于我怎样才能修补.NET程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆