September 21, 2004

Beware NGEN with missing assemblies...

Our primary line-of-business application has auto-update support built into it. However, it also runs nearly twice as fast once it has been NGEN'ed.

Obviously, if you update the executable, the NGEN'ed assembly won't match, so you need to re-NGEN it.

How we handled it was we set a registry key with the last version number that was NGEN'ed. If the version numbers didn't match, we'd launch a program that would NGEN all of our assemblies, then relaunch our original program.

However, the latest version included some links to some DirectX libraries. On machines that did not have Managed DirectX installed, NGEN would freeze.

Just be careful when you re-NGEN.

No comments: