The difference is mentioned here: C# 4, and later versions, converts the returned Object to dynamic automatically if the assembly is referenced by the /link compiler option or, equivalently, if the Excel Embed Interop Types property is set to true. True is the default value for this property., 3/11/2011 · In case you didnt notice, VS2010 adds a new property to assembly references in the properties window: Embed Interop Types : This property was introduced as a way to overcome the pain of deploying Primary Interop Assemblies.Read that blog post, it will help understand why you DONT need it when doing VS extensibility (VSX) work.
Embed Interop Types. Visual Studio 2010 (C# v4.0) provided the ability to Embed Interop Types The PIAs are embedded into your project by default. These can be embedded into your assembly so that you don’t have to deploy them alongside your solution. There is an Embed Interop Type property associated with each interop reference assembly.
Type equivalence and embedded interop types simplify the deployment of applications and add-ins that use COM components, because it is not necessary to deploy interop assemblies with the applications. Developers of shared COM components still have to create primary interop assemblies (PIAs) if they want their components to be used by earlier …
After you specify the public interfaces that can be embedded, you create runtime classes that implement those interfaces. A client program can embed the type information for the interfaces at design time by referencing the assembly that contains the public interfaces and setting the Embed Interop Types property of the reference to True . The client program can then load.
C# Office Developer Tools – Embed Interop Types, c# – Interop type cannot be embedded – Stack Overflow, Type equivalence and embedded interop types | Microsoft Docs, 3/11/2011 · In case you didnt notice, VS2010 adds a new property to assembly references in the properties window: Embed Interop Types : This property was introduced as a way to overcome the pain of deploying Primary Interop Assemblies.Read that blog post, it will help understand why you DONT need it when doing VS extensibility (VSX) work.
By default, when you add a PIA to a Visual Studio 2010 .NET 4.0 project without using the Add ArcGIS Reference plug-in, the PIA’s Embed Interop Types property is set to true. The best practice is to change this setting to false when deploying customizations for ArcGIS, because the ArcGIS installer lays down the appropriate PIAs and assemblies on the system you should not.
Read more in Scott Hanselman’s blog post about it and other VS improvements here. As for whether it is advised or not, I’m not sure as I don’t need to use this feature. A quick web search yields a few leads: Check your Embed Interop Types flag when doing Visual Studio extensibility work The Pain of deploying Primary Interop Assemblies