Compiler Warning for Terminal User Control

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

Environment

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

Situation

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\15.4.0.0__13bff1b6907eadcf\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.

Resolution

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

2579_0.gif

Cause

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.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.