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 False
? What's the difference?
Since we have a lot of projects, among some of them, reference was set to False
, others were set to True
, it is totally mess up. And the bulid server also have the same warnings:
What does “reference was created to embedded interop assembly” mean?
So we plan to change all the Embed Inteop Types
to False
, what risk would we get?
This question is related to
c#
visual-studio
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.
Source: Stackoverflow.com