Error 1: Interop Type Cannot Be Embedded

Updated Nov 12, 2019

Reported In

Software

  • TestStand

Issue Details

When using certain TestStand types in a new Visual Studio .NET project, I am seeing an error similar to the following:

Error 1 Interop type 'NationalInstruments.TestStand.Interop.API.GetSeqFileOptions' cannot be embedded. Use the applicable interface instead.

How can I prevent this error from occurring?

Solution

This error occurs because the default value is true for the Embed Interop Types property of the TestStand API Interop assembly referenced in the new project. To resolve this error, change the value of the Embed Interop Types property to False by following these steps:
 
  1. Select the TestStand Interop Assembly reference in the references section of your project in the Solution Explorer.

  2. Find the Embed Interop Types property in the Property Browser, and change the value to False

WAS THIS ARTICLE HELPFUL?

Not Helpful