What's the difference setting Embed Interop Types true and false in Visual Studio?

后端 未结 2 1830
醉酒成梦
醉酒成梦 2020-11-29 22:05

In Visual Studio, when adding one reference to the project, the properties window has an option Embed Inteop Types, should we set it to True or

2条回答
  •  长情又很酷
    2020-11-29 22:24

    I noticed that when it's set to false, I'm able to see the value of an item using the debugger. When it was set to true, I was getting an error - item.FullName.GetValue The embedded interop type 'FullName' does not contain a definition for 'QBFC11Lib.IItemInventoryRet' since it was not used in the compiled assembly. Consider casting to object or changing the 'Embed Interop Types' property to true.

提交回复
热议问题