Compiler Warning for Terminal User Control

  • 7021397
  • 01-Nov-2011
  • 02-Mar-2018


Reflection 2014
Reflection for IBM 2014
Reflection for UNIX and OpenVMS 2014
Reflection for IBM 2011 R2 or higher
Reflection for UNIX and OpenVMS 2011 R2 or higher
Reflection Standard Suite 2011 R2 or higher


You may receive a compiler warning similar to the following when you are using Visual Studio 2010 to create a Windows Forms application that uses TUC and .NET Framework 4.0:

Warning A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC_MSIL\Reflection\\Reflection.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files\Attachmate\Reflection\Programmer Interfaces\Attachmate.Reflection.UserControl.IbmHosts.dll'. Consider changing the 'Embed Interop Types' property on either assembly.


To resolve the compiler warning, set the Embed Interop Types property for each of the assemblies referred to in the compiler warning to false.



This compiler warning occurs because the Terminal User Control .DLL (for example, Attachmate.Reflection.UserControl.IbmHosts.dll) cannot set its Embed Interop Types property; the .DLL is targeted for a .NET runtime prior to 4.0 and this property is new to .NET 4.0.

When you add TUC to a form, Visual Studio automatically adds references to assemblies (such as the Reflection.dll) to the project and sets the Embed Interop Types property of these references to true.

Note: Because Embed Interop Types is a new feature in .NET 4.0, this compiler warning occurs only for applications that are targeting .NET 4.0.

Additional Information

Legacy KB ID

This article was originally published as Attachmate Technical Note 2579.