Udostępnij za pośrednictwem


Fix for trying to use EnvDTE.Constants in VS2010

I ran into a problem today while trying to iterate over the files in a ProjectItem as I wanted to look at the item.Kind property and compare it to values in EnvDTE.Constants.

Turns out there's something weird going on with VS2010 related to our old friend COM Interop.

Thankfully, Misha Shneerson, a Principal SDE in Office tools, has posted a solution: https://blogs.msdn.com/b/mshneer/archive/2009/12/07/interop-type-xxx-cannot-be-embedded-use-the-applicable-interface-instead.aspx