The Pitfalls of mscoree.dll
The Visual Studio setup project created when you create a COM add-in using the Shared AddIn Wizard provides a setup package that you can use to deploy your COM add-in to your customers' machines. At first glance, the setup created by Visual Studio appears to cover all the deployment requirements for COM add-ins. Alas, life is not quite that easy. A deployed COM add-in written in managed code really needs to be shimmed. To understand what a shim is and why it is needed, we have to dig into how a COM add-in written in managed code is actually loaded into an Office application.