What is Single Servicing?

Single Servicing is that when you fix a bug in your component, you drop a single binary with the fix into customer's machine, everyone using your component automatically get the fix.

Sounds easy. But in reality it is much harder.

1. Applications may statically link to your component. Those applications will have to re-compile to get your fix.

The recent zlib bug is an example.

2. Applications may carry a private copy of your componenent. Those applications will have to re-deploy your new component to their private directory.

The recent GDI+ bug is an example.

You are very screwed.

Well, until you start using managed code. Fortunately, it is very possible to achieve single servicing.

1. Static Linking

You can't statically link an managed assembly. You simply can't. The platform does not support it.

Joel Spolsky asked: " Please Sir May I Have a Linker?". Jason Zander answered: "No".  You know, you should be very thankful for that decision.

2. Private Deployment

In Whidbey we made two changes to assembly loading:

Assembly.Load* now apply policy

Assembly.LoadFrom/LoadFile/Load(byte[]) prefers GAC

The two changes together, give you a way to do single servicing in .Net.

If you buy versioning, you change your assembly version number, issue a publish policy, and install your fix to GAC. Everyone picks up the fix.

If you don't buy versioning, you don't change your assembly version number, and install your fix to GAC. Everyone picks it up.

Of course, the bottom line is, you have to strongly name your assembly.

In light of the zlib and GDI+ patching problem, aren't you glad that in .Net you can be assured of single servicing?