What is the Embedded Interop Types check mark in VS responsible for?

On Office builds, there is a check mark like this: Embed Interop Types

What is it responsible for? With this check mark, it is not possible to copy the assembly locally.

I noticed that if you disable it, some operations with office objects require an explicit type conversion.

Author: VladD, 2016-08-13

1 answers

Original response to EnSO: https://stackoverflow.com/a/20515311/5796587

This option was introduced to remove the need to deploy very large interop assemblies (PIAs - > Primary Interop Assemblies).

Enabling this option allows you to embed managed code to communicate with unmanaged assemblies in your assembly, but instead of embedding all the interop assembly code, it only embeds the elements that are actually used in your assembly. the code.

Read more on Scott Hanselman's blog about this and other Visual Studio improvementshere. Additional information here and here.

The translation is quite free, for practical use, use the original materials from the links in this or the original answer.

 2
Author: rdorn, 2020-06-12 12:52:24