Check your Embed Interop Types flag when doing Visual Studio extensibility work

In case you didn’t notice, VS2010 adds a new property to assembly references in the properties window: Embed Interop Types:

image

This property was introduced as a way to overcome the pain of deploying Primary Interop Assemblies. Read that blog post, it will help understand why you DON’T need it when doing VS extensibility (VSX) work.

It's generally advisable when doing VSX development NOT to use Embed Interop Types, which is a feature intended mostly for office PIA scenarios where the PIA assemblies are HUGE and had to be shipped with your app. This is NEVER the case with VSX authoring. All interop assemblies you reference (EnvDTE, VS.Shell, etc.) are ALWAYS already there in the users' machine, and you NEVER need to distribute them. So embedding those types only increases your assembly size without a single benefit to you (the extension developer/author)....

Read full article

No Comments