Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010: Embed Interop Types

I found some information about this on Scott Hanselmans Blog

Does anybody exactly know what this mean?

Is this only for the Office Primary Interop Assemblies, or can I also use this to Embed my Redemption library or other COM libraries?

like image 370
ollifant Avatar asked Oct 20 '09 19:10

ollifant


People also ask

What is embed Interop type?

Type embedding is frequently used with COM interop, such as an application that uses automation objects from Microsoft Office. Embedding type information enables the same build of a program to work with different versions of Microsoft Office on different computers.

What are embedded assemblies?

An embedded component is a copy of a component that becomes part of its parent assembly. The parent assembly can be the top-level assembly or a subassembly. In an inseparable assembly all components are embedded in the assembly. It is a single file that contains all components in the assembly.


1 Answers

The process described in Scott Hanselman's blog is called Type Equivalence, a rather nebulous term for the CLR 4.0's support for COM interop type assemblies. Although I haven't had a chance to look at it, there is a video here at Channel 9 that discusses it:

Raja Krishnaswamy and Vance Morrison: CLR 4 - Inside Type Equivalence
http://channel9.msdn.com/shows/Going+Deep/Raja-Krishnaswamy-and-Vance-Morrison-CLR-4-Inside-Type-Equivalence/

Apparently you can write your own "type equivalence" assemblies, and embed them. Note that this probably does not apply to just any COM assembly; type equivalence assemblies implement an interface called IApplication. See here:

Advances in .NET Type system: Type Equivalence Demo http://blogs.msdn.com/mshneer/archive/2008/10/28/advances-in-net-type-system-type-equivalence-demo.aspx

like image 162
Robert Harvey Avatar answered Sep 19 '22 15:09

Robert Harvey