Monday, July 30, 2007

Consequences of Strong Naming Assembly in .NET

Any code you have that uses this assembly, will need to be recompiled with a reference to the new assembly with the newer version.

Strong named assemblies can only reference other strong named assemblies.

If your product includes many assemblies (.NET DLL's) and you want to ship only one of them as a hotfix, you will not be able to because your other assemblies will still refer to old version of the DLL. So either restrict to the same old version or use the .Net Framework configuration tool to forward the old version to the new version.

If you have classes that need to be serialized, the engine includes type information in the serialized data, that way it can be reconstituted later. If you the AssemblyFormat property is not set correctly, you could end up with a situation here you have stored some data, upgraded your application (maybe because of a bug fix), and then
error when you try to load your serialized database (even though nothing in that particular class has changed).

Unless your assemblies need to be placed in the GAC, or run as COM+ component, or some other special case,
strong-naming them probably is not necessary.

No comments:

 
Dotster Domain Registration Special Offer