Visual Studio 2010: Embed Interop Types

末鹿安然 提交于 2019-12-05 01:28:04

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

One remark about: if you add reference and property "Embed Interop Types = true " - this can make some casuistic errors while you compiling : - you see what inside reference have functions and propertyes - but compilator don't find it and generate errors !

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!